Commit Graph

10099 Commits (3a0664073042e01a305d973d9a0c3cf274d0fb4f)

Author SHA1 Message Date
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
nebadon e3885625a0 Don't rotate child prims, if only the root prim is rotated. 2011-11-05 02:26:25 -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) 8105794121 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-05 01:42:20 +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
Melanie b199aad037 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2011-11-05 00:11:10 +00: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
Justin Clark-Casey (justincc) f7b8c54c24 Add comment for experimental effect of removing the Thread.Sleep(20) in ODEPrim.changevelocity() 2011-11-04 23:43:17 +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
Justin Clark-Casey (justincc) ccca6ba935 Stop llPushObject() from causing problems by adding force via a taint rather than directly.
This isn't a perfect solution since there can be a race between the taint processing and taint setting, as force needs to be reset after processing.
Needs careful locking in the future.
2011-11-04 23:12:01 +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
Justin Clark-Casey (justincc) a62ccb5c4c Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-11-03 20:12:10 +00:00
Melanie e746840226 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2011-11-02 23:51:48 +00:00
Melanie 08fcf958c2 Port the Avination offline messaging system to Core 2011-11-02 23:50:47 +00: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) 59232a6ea8 Change default say distance to 20m from 30m, the same as on the big grid. This is to improve the migration of scripts that expect a 20m say distance.
If you want to keep a 30m say distance then please set this as the say_distance parameter in the [Chat] section of OpenSim.ini.
2011-11-02 20:05:31 +00:00
Justin Clark-Casey (justincc) 72923134e9 Get some hopefully more useful exception information when OpenJPEG.EncodeFromImage() fails in VectorRender and DynamicTexture modules 2011-11-02 18:40:49 +00: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
Melanie c5fb39e21f Restore the recursive calling of PRIM_LINK_TARGET because the version I made
breaks LINK_SET et al.
2011-11-02 12:09:18 +00:00
Melanie 1b9ae3fb51 Some positioning fixes from AVN trunk 2011-11-02 12:02:44 +00:00
Melanie b9e700b60d Streamline PRIM_LINK_TARGET, eliminating a recursion and a failure scenario 2011-11-02 11:43:16 +00:00
Dan Lake 7c8bfac11b Removed redundant SceneContents property from Scene. It's the same as SceneGraph property. 2011-11-01 17:20:12 -07:00
Dan Lake 3bead3eb50 Part 2 of see_into_this_sim_from_neighbor configuration option removal 2011-11-01 17:11:43 -07:00
Dan Lake 4b58d4ff95 Removed see_into_this_sim_from_neighbor configuration option. 2011-11-01 16:51:14 -07:00
Justin Clark-Casey (justincc) 9456a540c5 Add "appearance send" command to allow manual sending of appearance. 2011-11-01 23:23:45 +00:00
Dan Lake 3c55f3015f Removed unused show commands from Scene.cs and SceneBase.cs. The show modules command in OpenSim.cs now shows both shared modules and region modules. 2011-10-31 16:42:28 -07:00
Dan Lake d3153f47fa Adding green dots to map response should be for root agents only 2011-10-31 15:20:57 -07:00
Dan Lake 14646f2524 Fix line endings 2011-10-30 23:43:17 -07:00
Dan Lake a85ff884d9 Experimental reorder of Heartbeat loop now simulates physics and sends updates to clients prior to sleep. Existing behavior was to sleep BEFORE sending updates. We found this patch reduced latency to clients by 1-2 heartbeat periods. 2011-10-30 23:39:39 -07: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) 9fdd1753fa Add taint target velocity for ODECharacters as is already done for ODECharacter position and position and velocity for ODEPrims.
This is to help stop surprises if the velocity is set in the middle of physics calculations, though this probably isn't a huge problem.
It's more for consistency and for the next step of removing some scene locks
2011-10-29 02:30:33 +01:00
Justin Clark-Casey (justincc) ef8370fb8e tidy up OdeCharacter so that we just use OpenMetaverse.Vector3 assignment directly where possible, instead of transferring X, Y and Z components separately
some of this is probably a hold over from using ODE.Vector3, which is still necessary in some places.
2011-10-29 02:07:28 +01:00
Justin Clark-Casey (justincc) a5ea9f8830 Move position set from taint to logically better position at top of ODECharacter.ProcessTaints() though this makes no practical difference 2011-10-29 01:46:22 +01:00
Justin Clark-Casey (justincc) 5ae8de3c00 Stop setting _position as well as m_taint_position in ODECharacter.Position
setting position at the same time as taint appears to undermine the whole purpose of taint
testing doesn't reveal any obvious regressions in doing this
2011-10-29 01:39:48 +01: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) 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 272bf71279 Removed use of 'is' operator and casting to find the root ScenePresence in MessageTransfer modules and Groups module. 2011-10-27 02:26:37 -07: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
Dan Lake b98613091c Added new ForEachRootScenePresence to Scene since almost every delegate passed to ForEachScenePresence checks for !IsChildAgent first. It consolidates child and root handling for coming refactors. 2011-10-27 00:42:21 -07:00
Justin Clark-Casey (justincc) 40bee97015 For now, comment out error message on new script engine console commands.
This causes false positives if a simulator has more than 1 region and the current region is 'root' since this sends the command separately to each region and each region has its own XEngine
2011-10-27 03:01:27 +01:00
Justin Clark-Casey (justincc) 76c50d23f2 Comment out inventory folder bulk update code on InventoryAccepted message introduced in commit db91044 on Aug 22 2011
This should be unecessary since the folder update is already made at the time of the offer (and moved to trash if not accepted).
This code was also not taking into account the situation where an item was accepted.
Needs more fixing if this results in an aggression elsewhere.
2011-10-27 02:56:08 +01:00
Justin Clark-Casey (justincc) e210d95821 Don't blow our brains out if LLClientView.BulkInventoryUpdate() is wrongly passed a null node reference.
Addresses worst aspect of http://opensimulator.org/mantis/view.php?id=5752
2011-10-27 02:50:58 +01:00
Justin Clark-Casey (justincc) 2db6a8ce8f Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-27 02:06:59 +01:00
Justin Clark-Casey (justincc) 820242bc49 Fix a bug I introduced yesterday in ODE physics where prim scripts would only receive the very first collision. 2011-10-27 02:05:59 +01:00
Michelle Argus 41395d5443 Added optional owner classes to existing OSSL agent Permissions
PARCEL_GROUP, PARCEL_OWNER, ESTATE_MANAGER and REGION_OWNER can be combined with the existing agent uuid option to limit ossl functions to agents and owner classes.

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-10-26 10:35:50 -04:00
SignpostMarv Martin 9a28e7a4e0 Implementation of PRIM_OMEGA, but only for setting
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-10-26 08:41:07 -04:00
SignpostMarv Martin 059f4b6a3a Implementing PRIM_LINK_TARGET, but only for setting params
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-10-26 07:47:44 -04:00
Justin Clark-Casey (justincc) 6a74a4c12b Clear OdeCharacter CollisionEventUpdate when we subscribe or unsubscribe from collision events 2011-10-25 22:46:42 +01:00
Justin Clark-Casey (justincc) 0f83f87233 Remove unused fields from CollisionEventUpdate 2011-10-25 22:39:08 +01: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
Justin Clark-Casey (justincc) b9f106f484 When sending object collision updates, don't null out and recreate the CollisionEventUpdate() if the number of collisions falls to zero. Reuse the existing one instead. 2011-10-25 22:28:40 +01:00
Justin Clark-Casey (justincc) 5d37f0471e For ScenePresence collision events, instead of creating a new CollisionEventsThisFrame every time we need to send some new ones, reuse the existing one instead.
This assumes that the listener is using the data synchronously, which is currently the case.
2011-10-25 22:19:17 +01:00
Justin Clark-Casey (justincc) 7b6b36cee9 Fix bug where collision event listeners were not removed once the listener had gone away.
This was causing continuous use of temporary memory even when all avatars had left the scene.
Memory does leak but it does cause more calls to the garbage collector, which would pause the scene thread for a very short while during collection.
2011-10-25 21:40:51 +01:00
Justin Clark-Casey (justincc) 1fbb379536 minor: rename a parameter in OdeScene.Simulate() from actor -> prim since it's an OdePrim 2011-10-25 21:15:37 +01:00
Justin Clark-Casey (justincc) 8a0a78cbcc Make OpenSim.Framework.Servers.HttpServer rely on OpenSim.Framework instead of the other way around.
This is necessary so that code in HttpServer can use framework facilities such as the thread watchdog for monitoring purposes.
Doing this shuffle meant that MainServer was moved into OpenSim/Framework/Servers
Also had to make OpenSim.Framework.Console rely on OpenSim.Framework rather than the other way around since it in turn relies on HttpServer
MainConsole and some new interfaces had to be moved into OpenSim/Framework to allow this.  This can be reverted if parts of OpenSim.Framework stop relying on console presence (cheifly RegionInfo)
2011-10-25 20:24:21 +01:00
Justin Clark-Casey (justincc) 9ec672c70b Fix bugs in EventQueueGetModule.ClientClosed() and BaseHttpServer.RemovePollServerHTTPHandler() that stopped existing code in ClientClosed() from actually tearing down the poll handler
Actually doing the tear down appear to have no ill effects with region crossing and teleport.
2011-10-24 23:16:03 +01:00
Justin Clark-Casey (justincc) 79d5bc9beb separate out future common setup code from EventQueueTests.AddForClient() 2011-10-24 22:29:13 +01:00
Justin Clark-Casey (justincc) e28e2d24c7 Add new EventQueueTests with basic test to check that adding a client registers an http poll 2011-10-24 22:23:41 +01:00
Justin Clark-Casey (justincc) 4c9400e646 Add optional getauthinfo and setauthinfo authentication service calls.
These are disabled by default, as before.  Please only turn these on in secure grids, since they allow the same facilities as the existing SetPassword call (also disabled by default)
These facilities can be helpful when integrating external systems, in addition to the existing option of adapting an IAuthenticationService or using WebLoginKey
2011-10-24 21:40:36 +01:00
Justin Clark-Casey (justincc) b868328d51 Comment out the uuid gatherer lines that I accidentally left in. 2011-10-23 03:14:32 +01:00
Pixel Tomsen c2272a755f Fix missing Busy-Mode Response
http://opensimulator.org/mantis/view.php?id=5748
2011-10-22 13:17:07 -04:00
BlueWall 3fc47275cf Add case to Lightshare/Windlight
Thanks thomax for a patch to add handling for Sun/Moon pos.
2011-10-22 13:06:34 -04:00
Justin Clark-Casey (justincc) ffdf59a57c Get UUIDGatherer to scan notecards in the graph for asset uuids.
This is to support npc baked texture saving in oars and iars.
May address http://opensimulator.org/mantis/view.php?id=5743
2011-10-22 02:16:46 +01:00
Justin Clark-Casey (justincc) 9b3bbedeea refactor: rename some AssetHelpers.CreateAsset() methods to CreateNotecardAsset() 2011-10-22 00:13:46 +01:00
Justin Clark-Casey (justincc) 4241ee5dfa very minor removal of old commented out line of code in OdeScene 2011-10-21 00:04:36 +01:00
Justin Clark-Casey (justincc) 30fe66d3ab remove unnecessary null check on _collisionEventPrim 2011-10-20 20:58:29 +01:00
Justin Clark-Casey (justincc) 9c43020876 Get OdeScene to use passed in time step rather than hard-coded 0.089
However, I still don't recommend changing MinFrameTime from 0.089, high values do not work well and lower values don't seem to make much difference
2011-10-20 20:48:51 +01:00
Justin Clark-Casey (justincc) 6837e44d07 Pass PhysicsScene.Simulate() only the MinFrameTime rather than the useless Math.Max(SinceLastFrame.TotalSeconds, MinFrameTime)
SinceLastFrame was calculating the interval between any sleep that had occurred to pad out the frame time and the start of the next frame.
This would usually be below MinFrameTime but occasionally if the sleep was long it would be above, often due to the time required to update the watchdog.
This doesn't appear to play much practical role right now.
ODE was actually ignoring it entirely.  Bullet might be helped slightly by receiving a non-varying value.
2011-10-20 19:44:59 +01:00
Justin Clark-Casey (justincc) b63ec987b0 For now, stop passing timeStep into methods where it's not actually used. 2011-10-20 17:54:32 +01:00
Justin Clark-Casey (justincc) f16d125027 Change wording on asset requests.
Not all 'notified missing' assets are a problem.  Some are invalid references which happen to be buried in other text.
2011-10-19 23:56:17 +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 8b20faf06c Merge branch 'master' of git://opensimulator.org/git/opensim 2011-10-19 14:43:16 -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) 601dabb1b7 Extend scripts stop/start/suspend/resume console commands to allow action on a single script by giving the script item id (which can be found via scripts show).
Not an ideal way to do this on a region with many scripts.  Needs refinement later.
2011-10-19 22:30:31 +01:00
Justin Clark-Casey (justincc) 32c3faedd6 Add "scripts stop" and "scripts start" console commands.
These will stop all running scripts and start all stopped scripts respectively.
A stopped script does not save any events for later processing.
2011-10-19 21:40:28 +01:00
Justin Clark-Casey (justincc) f836710af5 minor: improve command help on scripts suspend/resume 2011-10-19 21:34:55 +01:00
Justin Clark-Casey (justincc) 5607fd3af8 Fix resume scripts.
On resume, we need to place requeue the script for event processing if there are any events on the queue.
Also need to do this under m_Script lock in order to avoid a race
2011-10-19 21:30:37 +01:00
Justin Clark-Casey (justincc) 3cf7fb4eca Add "scripts suspend" and "scripts resume" commands.
These aim currently to suspend and resume all scripts.
However, resume isn't currently working due to what looks like a bug in resume functionality itself.
2011-10-19 20:53:24 +01:00
Justin Clark-Casey (justincc) b45219065c on log and "show scripts" messages, show script item UUID rather than asset UUID
The item ID is the one required for any script manipulation on the command line, so I think it's somewhat more useful to show this bearing in mind the limited space available
2011-10-19 20:26:05 +01:00
Justin Clark-Casey (justincc) 116fbe8258 add current script status to "scripts show" command (running, suspended, etc.) 2011-10-19 20:24:07 +01:00
Justin Clark-Casey (justincc) ecad9f9fd5 Add "show scripts" command to show all scripts currently known to the script engine in the current region.
Also added synonym of "scripts show"
2011-10-19 20:09:02 +01:00
Justin Clark-Casey (justincc) 581885da75 Temporarily put in log lines to record time taken to set terrain in OdeScene. 2011-10-18 21:21:15 +01:00
Justin Clark-Casey (justincc) 03202ada29 Store scene identifier passed in to OdeScene for later debug messages 2011-10-18 21:11:13 +01:00
Justin Clark-Casey (justincc) 1d4cd76e8a Don't bother taking OdeLock during OdeScene construction, since there can be no contention until the object is constructed. 2011-10-18 21:03:41 +01:00
Justin Clark-Casey (justincc) f10a824e47 Remove unnecessary lock of OdeLock in OdePrim.changeadd()
This taint can only ever be processed from the OdeScene.Simulate() loop, which already locks OdeLock.
2011-10-18 20:58:59 +01:00
Justin Clark-Casey (justincc) 5515c45e3b minor: method doc to explain a lock of OdeLock 2011-10-18 20:56:11 +01:00
Justin Clark-Casey (justincc) 71d221cdc0 Remove the unused CollisionLocker from ODE
Despite its name, this wasn't actually being used in any collision checking
2011-10-18 17:35:58 +01:00
Justin Clark-Casey (justincc) aeb4ff0274 Allow an avatar to be explicitly named to the "debug packet" command 2011-10-17 20:58:23 +01:00
Justin Clark-Casey (justincc) 120114e96b refactor: Make IClientAPI.DebugPacketFormat a property rather than a setter without a getter 2011-10-17 20:50:29 +01:00
Justin Clark-Casey (justincc) 96ff2c63ed Add avatar names to debug packet output 2011-10-17 20:37:01 +01: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) 79c13cd997 rename OS_NPC_SIT_IMMEDIATE to OS_NPC_SIT_NOW since it's shorter and more understandable
This makes something like osNpcSit(npc, llGetKey(), OS_NPC_IMMEDIATE) now become
osNpcSit(npc, llGetKey(), OS_NPC_SIT_NOW);
This is why it's in development :)
2011-10-17 01:57:23 +01:00
Justin Clark-Casey (justincc) de161585c0 Implement osNpcStand(<npc-id>)
Allows you to stand an NPC that has sat.
2011-10-17 01:56:25 +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) b9930a6305 improve method doc on Scene.OtherRegionUp()
this is really just to trigger panda.
2011-10-15 03:17:58 +01:00
Justin Clark-Casey (justincc) ddf54b5537 move see_into_this_sim_from_neighbor [Startup] flag parsing into Scene with the others 2011-10-15 03:03:05 +01:00
Justin Clark-Casey (justincc) 528cc8136e fetch physical_prim switch from [Startup] config from inside scene, as is done for most other scene config params 2011-10-15 02:54:43 +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) 3843efe478 Restore [Startup] physical_prim flag which can stop any prims being subject to physics
This had stopped working.  However, at the moment it still allows the physics flag to be set even though this has no effect.  This needs to be fixed.
Default for this flag is true as previously.
2011-10-15 02:42:43 +01:00
Justin Clark-Casey (justincc) f2889d7ce9 remove redundant PhysActor.IsPhysical call from SOP.UpdatePrimFlags() as its done immediately afterwards in DoPhysicsPropertyUpdate() 2011-10-15 02:12:46 +01:00
Justin Clark-Casey (justincc) 732e937379 refactor: Remove redundant code in SOP.UpdatePrimFlags() 2011-10-15 02:07:05 +01:00
Justin Clark-Casey (justincc) c93c9ea072 factor common code out into SOP.RemoveFromPhysics() 2011-10-15 02:02:39 +01:00
Justin Clark-Casey (justincc) 978fb3d482 reduce access to ODECharacter methods to make code analysis easier. Eliminate redundant argument on ProcessTaints() 2011-10-15 01:41:39 +01:00
Justin Clark-Casey (justincc) 9cc2694776 restrict unnecessary access levels on ODEPrim fields/properties 2011-10-15 01:31:09 +01:00
Justin Clark-Casey (justincc) f2132329a3 refactor: make methods that do not need to be public in ODE private or internal to aid code reading/analysis. Remove some unused method arguments 2011-10-15 01:20:40 +01:00
Justin Clark-Casey (justincc) 4bfc2f5cde Change hardcoded ODE total frame time to match the default total frame time (0.09375 -> 0.089).
No apparant ill effects - because the default stepsize is 0.2, there are still 5 physics steps per physics frame.
This is a precursor to using the elapsed value passed in (and now changeable in config).
2011-10-14 21:07:57 +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) 77c65951e0 Extract NullPhysicsScene from PhysicsScene to improve code readability 2011-10-14 01:38:14 +01:00
Justin Clark-Casey (justincc) ee84c0589c Don't execute rest of code in XEngine.RemoveRegion() and Close() if the module is disabled. 2011-10-14 01:06:43 +01:00
Justin Clark-Casey (justincc) 4e7d4330c2 Expose minimum frame time and update periods for experimentation.
Settings are at bottom of [Startup] in OpenSimDefaults.ini, override in OpenSim.ini to change
Defaults are the same as previously.
More information to come on opensim-dev shortly.
Feel free to tweak but if you do please don't expect any support unless feedback on certain tweaks is explicitly requested.
2011-10-13 23:47:37 +01:00
Justin Clark-Casey (justincc) 128d8dfd8b refactor: Put the frame update period when temporary objects are cleaned up in a field, like all the other update periods 2011-10-13 22:28:42 +01:00
Justin Clark-Casey (justincc) fd274a6688 refactor: chain the two scene constructors together to eliminate more copypasta 2011-10-13 22:21:03 +01:00
Justin Clark-Casey (justincc) a6fa15e8b6 Tie reported FPS correction factor into the minimum frame time rather than setting separately.
This makes reported FPS scale as required if min frame time changes
2011-10-13 22:07:55 +01:00
Justin Clark-Casey (justincc) ceb326284e Move fps stat adjustment factor into field rather than hard-coded. 2011-10-13 21:55:51 +01:00
Justin Clark-Casey (justincc) 20da04fd0c More method doc and formatting changes. Makes DestroyOdeStructures() private 2011-10-13 21:42:24 +01:00
Justin Clark-Casey (justincc) 227db07f2f refactor: move 3x copy/pasted ode structure removal code in ODECharacter into a DestroyOdeStructures() method
also adds some method doc
2011-10-13 18:19:13 +01:00
Justin Clark-Casey (justincc) f08664f422 remove some mono compiler warnings 2011-10-12 21:54:25 +01:00
Justin Clark-Casey (justincc) 631d5e16ef Get rid of some traces of the old pre-ROBUST grid architecture config 2011-10-12 21:51:34 +01:00
Justin Clark-Casey (justincc) f5f7ca47ea Bring LindenUDP.Tests back from the dead. No tests are running.
Code drift means that most of this stuff doesn't compile but the structure is still useful.
2011-10-12 21:31:22 +01:00
Justin Clark-Casey (justincc) ea7366ddc6 When shutting down XEngine, log how many scripts are being shutdown so the user knows why they are waiting. 2011-10-12 19:42:04 +01:00
Justin Clark-Casey (justincc) c5826d589a minor: insert some commented out log lines which are a blunt but useful instrument to see packet expiry and received acks 2011-10-12 19:35:40 +01:00
Justin Clark-Casey (justincc) 36e73dbc9b Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-12 19:24:03 +01:00
Justin Clark-Casey (justincc) f9ffd2538f Improve some method doc for LLUDPClient, LLUDPServer and UnackedPacketCollection 2011-10-12 19:22:30 +01:00
Melanie ca74088d94 Change default groups messaging module in hardcode to the empty string.
Modules should not assume thet they are the one and only, but only be
enabled when explicitly configured.
2011-10-12 09:21:46 +01:00
Justin Clark-Casey (justincc) fe3594c5ea Start recording object updates per second statistic (analogue of agent updates per secod) and expose via monitoring module as ObjectUpdatePerSecondMonitor
A useful diagnostic to find out how object updates are burdening a scene
2011-10-11 22:17:05 +01:00
Justin Clark-Casey (justincc) f138a2056e meaningless change to goose panda 2011-10-11 00:29:41 +01:00
Pixel Tomsen 28f549bd64 osSetParcelDetails - PARCEL_DETAILS_CLAIMDATE
this new flag set parcels claim date
value 0 for this flag set current unixstamp

http://opensimulator.org/mantis/view.php?id=5725
2011-10-11 00:13:26 +01:00
Justin Clark-Casey (justincc) 353e7ce873 Allow monitoring of stats by region name 2011-10-10 23:58:27 +01:00
Justin Clark-Casey (justincc) 62aad4c18f Add other region stats (total frame time, physics fps, etc.) currently missing from MonitorModule
Unlike the other 3 stats mechanisms, monitor data can be queried per individual region, which makes this useful.
This doesn't affect an of the existing monitored stats.
2011-10-10 23:48:53 +01:00
Justin Clark-Casey (justincc) 19096bd391 Convert getLastReportedSimFPS() and getLastReportedSimStats() into more idiomatic LastReportedSimFPS and LastReportedSimStats on SimStatsReporter 2011-10-10 22:23:42 +01:00
Justin Clark-Casey (justincc) 8114f895c2 Provide a way to turn the MonitorModule on and off
Default is currently on since this is the historical setting
2011-10-10 22:17:29 +01:00
Justin Clark-Casey (justincc) 2b290793ab refactor: have lsl and ossl interrogate scene.StatsReporter directly rather than going through scene
I know this goes against the law of demeter but I don't think it's that useful here and I'd rather get rid of nasty little wrapper methods
2011-10-10 21:54:08 +01:00
Justin Clark-Casey (justincc) 013bf2775f remove unused LastAssetID from DynamicTextureUpdaer 2011-10-10 15:19:23 +01:00
Justin Clark-Casey (justincc) ff80113534 Go back to lying that sim fps is 55 when it's actually locked at a maximum of 11.
We're been lying since 2008 so I'm sure another few years can't hurt.
To know the real fps, either divide sim fps by 5 and/or look at the frame time.
2011-10-08 00:15:15 +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 f26a966b8e Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-06 22:50:03 -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
Justin Clark-Casey (justincc) 1f78dc6504 remove the pointless slashes on the end of the (5!) different server stat retrieval mechanisms.
Original request URLs that end with / will still work, but this will allow one to type /simstatus as well as /simstatus/
Can't do this with webstats yet since it does insane things to the path.
2011-10-07 00:30:35 +01:00
Justin Clark-Casey (justincc) 4c812884be Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-06 23:47:41 +01:00
Pixel Tomsen 95910f03d4 WebStats - Home Link Fix
http://opensimulator.org/mantis/view.php?id=4536
2011-10-06 22:30:24 +01: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) 7fa1c979cf rename WebStatsModules.m_scene to m_scenes since it's a list of scenes, not a single one 2011-10-05 23:36:27 +01:00
Justin Clark-Casey (justincc) 8a8983b3d4 Add user ID to new estate user prompt, to make it clearer and consistent with the main create user prompts 2011-10-05 23:34:18 +01:00
Justin Clark-Casey (justincc) 604708fc96 Change WebStatsModule to check its config properly, instead of catching the ineviable NullReferenceException!
Also, tidy up spacing.
2011-10-05 23:31:53 +01:00
Justin Clark-Casey (justincc) 9090039324 Remove unused local variable i from OdeScene.Simulate() 2011-10-05 22:15:28 +01:00
Justin Clark-Casey (justincc) 7d033187d8 Make reported sim fps more accurate, in line with frame time ms
Also remove some unused fields and improve naming on others.
2011-10-05 22:08:56 +01:00
Dan Lake 3142982353 Removed redundant scene presence lookups in HGMessageTransferModule 2011-10-05 12:58:24 -07:00
Dan Lake 38d205502a Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-04 16:59:35 -07:00
Dan Lake 146322eb34 Removed redundant IClientAPI calls from TreePopulatorModule. Removing tree objects already triggers objectkill packet to client. No need to send again. 2011-10-04 16:59:05 -07:00
Justin Clark-Casey (justincc) b907a66f39 When creating a new user on the comand line, give the option of allowing a UUID to be specified to override the randomly generated one.
This can be useful in some migration cases where recreating user accounts with known IDs will preserve region scene object ownership.
2011-10-04 23:48:35 +01:00
Dan Lake 92c88121c7 Removed all refs to IClientAPI from IAttachmentsModule. Separated client handlers for attachments to call public interface and rearranged module file into sections 2011-10-04 14:40:39 -07:00
Dan Lake bfa405e6f7 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-03 16:45:04 -07:00
Dan Lake 460946ad62 Removed redundant code in AttachmentsModule and simplified interfaces which converted back and forth between ScenePresence and IClientAPI. More to be done still. 2011-10-03 16:44:32 -07:00
Justin Clark-Casey (justincc) c7d0d71666 trival tweak to trigger the continuous integration system 2011-10-04 00:37:02 +01:00
Pixel Tomsen b98442dcec Animation-States Turning Left, Turning Right implemented/enabled
http://opensimulator.org/mantis/view.php?id=3036
2011-10-04 00:27:11 +01:00
Justin Clark-Casey (justincc) a8af0a5ba8 Return NULL_KEY from llGetTexture if a non-existent face is indicated, rather than ""
As per http://wiki.secondlife.com/wiki/LlGetTexture
2011-10-04 00:15:48 +01:00
Justin Clark-Casey (justincc) 8a6e6866d9 For llGetTexture(), if the face texture asset is in the inventory, return the inventory name rather than the asset UUID
This is as per http://wiki.secondlife.com/wiki/LlGetTexture
Applied patch in http://opensimulator.org/mantis/view.php?id=4552 with an additional break statement if an inventory item is found to exit early.
Thanks Michelle Argus!
2011-10-04 00:07:52 +01:00
Justin Clark-Casey (justincc) 34026887fe Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-03 23:26:52 +01:00
Justin Clark-Casey (justincc) 37ae6451f9 Remove vestigal RegionStatus.SlaveScene.
This appears to be code clutter since the code that uses this has long gone.
2011-10-03 23:25:09 +01:00
Dan Lake e77c919290 Remove usage of Linden packet types from inside Attachments Module and interface 2011-10-03 11:55:54 -07: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
Justin Clark-Casey (justincc) 42fe774ad1 Remove OpenSim.Region.Examples.SimpleModule
This module is more than 2 years old and at least some of the 'example' code it gives is now misleading.
Even the logs say it say some bits were broken where it was put in!
2011-10-01 01:21:20 +01:00
Pixel Tomsen c7db3df344 llGetLinkKey, llGetLinkName Fix for sitting Avatar
when an avatar sits on a prim, we get now his key & name ;-)

http://opensimulator.org/mantis/view.php?id=4476
2011-10-01 00:41:47 +01:00
Justin Clark-Casey (justincc) 246443773a minor: remove clutter null check from pass in config to AvatarFactoryModule.Initialize()
This is never null
2011-10-01 00:15:30 +01:00
Justin Clark-Casey (justincc) e742cffe15 Add Enabled switch in new [Attachments] section in OpenSimDefaults.ini to allow attachments to be temporarily turned off.
This is for debugging purposes.  Defaults to Attachments Enabled
2011-09-30 01:19:22 +01:00
Pixel Tomsen 528fcede6c llAvatarOnLinkSitTarget Implementation
http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget
2011-09-29 01:08:05 +01:00
Justin Clark-Casey (justincc) a3531dec1a Add en_US culture setting to the async delete to inventory thread, to avoid any issues with float serialization with machines set to non en_US locales.
Doing this to see if addresses inventory object deserialization problems in http://opensimulator.org/mantis/view.php?id=5708, though if it does I'm really surprised not to have seen it before now.
Really need to go through and systematically set the culture for every timer and change all BeginInvoke calls to FireAndForget instead.
But don't want to do something like that this close to a release.
2011-09-26 23:00:16 +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) 8caf3ed49e Remove the unimplented "clear assets" command.
This was a bizarre relic of a bygone age that had no implementations.
If you're using and want to clear the flotsam asset cache then please use the existing "fcache clear" command
2011-09-24 02:22:47 +01:00
Kevin Houlihan & Michelle Argus 39d7945efc Added a setting to [Startup] section of config that will allow the simulator to start up with no regions configured.
I added the boolean config setting "allow_regionless", defaulting to false. If set to true, opensim will start up ok if no region configurations are found in the specified region_info_source. It will not ask the user to create a region.
2011-09-24 01:59:02 +01:00
Justin Clark-Casey (justincc) c14c4bc1ec Don't try and resolve user account for authorization if the agent has come in via hypergrid.
If a user account isn't available, this just passes on the name given by the agent instead.
I'm not sure this is particularly useful since I believe that agent names could be faked in this context - it might be no more useful than a viewer agent string.
In fact, there might even be an argument that passing on this name provides a false expectation of authenticity.  However, I will apply for now.
Patch applied from http://opensimulator.org/mantis/view.php?id=5696
Thanks Michelle Argus.
2011-09-24 01:39:37 +01:00
Justin Clark-Casey (justincc) 839c1cdcc4 Improve locking when access queue in EventQueueGetModule 2011-09-24 01:10:23 +01:00
Justin Clark-Casey (justincc) bec0cbe82b remove unused SOP.Create() method 2011-09-23 22:20:15 +01:00
Justin Clark-Casey (justincc) c8304b7f84 Fix avatar parameter updating for viewer 3 and maybe 2.
When a slider parameter is changed, the viewer uploads a new shape (or other asset) and the item is updated to point to it.
Viewer 1 uploaded the data in the initial request itself, so the asset references was almost always correctly updated.
However, viewer 3/2 always uploads data in a subsequent xfer, which exposed a race condition where the viewer would make the item update before the asset had uploaded.
This commit shuffles the order of operations to avoid this race, the item is updated with the new asset id instead of the old one while the upload was still taking place.
A second race had to be fixed where avatar appearance would also be updated with the old asset id rather than the new one.
This was fixed by updating the avatar appearance ids when the appearance was actually saved, rather than when the wearables update was made.
2011-09-23 02:59:33 +01:00
Justin Clark-Casey (justincc) 41616cad09 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-09-22 01:11:19 +01:00
Justin Clark-Casey (justincc) 3ccb58c05c Fix failure to teleport when an agent is lured on the same sim (and probably in neighbouring sims) with HG lure active
It turns out that the HG lure module was setting up a pending lure when it intercepted the instant message on its way out to the target avatar.
However, an IM would only be sent if the user was remote, so it would not be set up for users on the same sim or in an immediate neighbour.
We fix this by adding the pending lure when the message goes out and ignoring a duplicate pending lure add if it goes to out via IM.
Hopefully addresses http://opensimulator.org/mantis/view.php?id=5690
2011-09-22 01:08:38 +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) 241e07d006 Move code which handles NPC movement into Scene so that this can also be used by Autopilot coming from the client side.
I thought that I had implemented this but must have accidentally removed it.
Adds a regression test to detect if this happens again.
Temporarily disables automatic landing of NPC at a target.  Will be fixed presently.
2011-09-21 23:56:11 +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) 1e798136c3 adjust some whitespace to trigger another build, to check the last failure was just a glitch 2011-09-17 01:33:55 +01:00
Justin Clark-Casey (justincc) f950338124 Remove old bullet DotNET and X libraries in preparation for BulletS
These weren't working properly anyway.
You will need to rerun prebuild.sh/.bat after this commit, and maybe "nant clean" as well.
2011-09-17 01:09:25 +01: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
justincc a00327d0e5 Fix build errors on Windows by adding missing OpenSim.Services.Base reference 2011-09-16 19:54:23 +01:00
Kevin Houlihan 1458fab82c Reattaching a region was failing if the estate name had not changed (issue 5035).
Using the RemoteAdmin API to close then recreate a region would fail if the estate name had not changed. If the estate name /was/ changed then the existing estate would be renamed rather than a new one being created. The problem really arose from a lack of distinction in the data storage layer between creating new estates and loading existing ones.
2011-09-16 18:50:25 +01:00
Justin Clark-Casey (justincc) 9046651583 Pass any region scope through to the CreateUser() method 2011-09-16 00:36:43 +01:00
Justin Clark-Casey (justincc) 4ae4b14b5d refactor: move estate owner setup code into separate method 2011-09-16 00:24:23 +01:00
Justin Clark-Casey (justincc) 522d6261f1 Correctly create a freshly created estate owner's default items and avatar entries on standalone if applicable. 2011-09-16 00:12:12 +01:00
Justin Clark-Casey (justincc) c4efb97d49 Write code to create minimum necessary body parts/clothing and avatar entries to make a newly created user appear as a non-cloud on viewer 2
Viewer 2 no longer contains the default avatar assets (i.e. "Ruth") that would appear if the user had insufficient body part/clothing entries.
Instead, avatars always appear as a cloud, which is a very bad experience for out-of-the-box OpenSim.
Default is currently off.  My intention is to switch it on for standalone shortly.
This is not particularly flexible as "Ruth" is hardcoded, but this can change in the future, in co-ordination with the existing RemoteAdmin capabilities.
Need to fix creation of suitable entries for users created as estate owners on standalone.
Avatars still appear with spooky empty eyes, need to see if we can address this.
This commit adds a "Default Iris" to the library (thanks to Eirynne Sieyes from http://opensimulator.org/mantis/view.php?id=1461) which can be used.
2011-09-15 22:59:29 +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) a4cc5f628f Only bother to create an inventory xfer file if there are any items in a prim inventory 2011-09-15 18:42:10 +01:00
Justin Clark-Casey (justincc) 8fb3e71b14 Shuffle order of code in invnetory connector GetFolderContent() calls to avoid a possible race condition 2011-09-15 18:36:22 +01:00
Justin Clark-Casey (justincc) 42f1b88eb2 If a prim inventory becomes empty through deletion, send an empty xfer file name rather than one that references a metadata file containing only the folder object.
If we do this, then viewer 3 crashes when we try and rez a script directly in an attachment's prim inventory.
Sending an empty file name was already being done if the prim's inventory had never been touched.
Now we always do that if there are no items in that inventory.
Hopefully addresses the remaining point in http://opensimulator.org/mantis/view.php?id=5644
2011-09-15 18:13: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) 1084d8f6a2 Remove code from DetachSingleAttachmentToInv() that sets group changed on all parts, now that we're performing this check in UpdateKnownItem() for other purposes 2011-09-13 22:39:06 +01:00
Justin Clark-Casey (justincc) 61affee814 remove redunant itemID and agentID arguments from UpdateKnownItem().
itemID is always taken taken from the group's stored item id, and agentID is never used.
2011-09-13 22:33:15 +01:00
Justin Clark-Casey (justincc) 2d62484f11 Remove UpdateKnownItem() from IAttachmentsModule.
It's not appropriate for code outside the attachments module to call this.
2011-09-13 22:27:33 +01:00
Justin Clark-Casey (justincc) 62b3e74bc5 minor: remove redundant grp != null check from AM.UpdateKnownItem() 2011-09-13 22:24:33 +01:00
Justin Clark-Casey (justincc) 8880aea728 Stop attempts to rewear already worn items from removing and reattaching.
Viewer 2/3 will sometimes attempt to rewear attachments, even though they have already been attached during the main login process.
This change ignores those attempts.
This stops script failures during login, as the rewearing was racing with the script startup code.
It might also help with attachments being abnormally put into deleted state.
Hopefully resolves some more of http://opensimulator.org/mantis/view.php?id=5644
2011-09-13 22:13:58 +01:00
Justin Clark-Casey (justincc) 618277e797 Comment out attachments code in Scene.IncomingCreateObject(UUID userID, UUID itemID) for now
As far as I can see, this is only invoked by a PUT request to ObjectHandlers, which is not being used anyway.
Invoking attachments code at this point is probably inappropriate since it would still be invoked when the client entered the scene.
Being commented to simplify analysis of attachments issues.  Can be uncommented when in use.
Also, small tweak to lock and log removal of a SOG from the SceneObjectGroupsByLocalPartID collection in SceneGraph.GetGroupByPrim() if an inconsistency is found.
2011-09-13 20:25:32 +01:00
Justin Clark-Casey (justincc) df73833a2c stop the duplicate remove of the root part ids from the full part and local part indexes in SG.DeleteSceneObject()
this is unnecessary because the parts array iterated through contains the root part as well as the non-root parts
2011-09-13 18:11:13 +01:00
Justin Clark-Casey (justincc) f09a90d8a7 extend TestGetSceneObjectByPartLocalId() to test state after scene object deletion 2011-09-13 18:08:05 +01:00
Justin Clark-Casey (justincc) 07ba28f1de In SG.AddSceneObject(), stop unnecessarily adding the root part to object indexes sepearately from the other parts.
The SOG.Parts property contains the root part as well as the non-root parts
2011-09-13 17:56:02 +01:00
Justin Clark-Casey (justincc) c14f0a22d4 Add new TestGetSceneObjectByPartLocalId() for retrieving a scene object via the local id of one of its parts 2011-09-13 17:52:10 +01:00
Justin Clark-Casey (justincc) 88bd71b978 improve TestAddSceneObject() to test a multi-part object rather than a single-part 2011-09-13 17:40:39 +01:00
Justin Clark-Casey (justincc) 306af9934a In an object return message, send a null-terminated empty string in binary bucket to prevent a viewer 3 crash.
This is the message sent to the client when the object is returned.
We were sending byte[0] in the binary bucket.  This didn't kill viewer 1 but did terminate viewer 3 (don't know about viewer 2).
So sending "\0" instead.
This is to address http://opensimulator.org/mantis/view.php?id=5683
2011-09-13 17:13:42 +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) 00f8946bd4 minor: if the script engine fails to find a prim for a script, also print out that prim's local id in the error message. 2011-09-12 22:44:14 +01:00
Justin Clark-Casey (justincc) 294120c9d3 comment out some recent terrain texture logging 2011-09-12 22:26:04 +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
Oren Hurvitz 7f318277f1 When creating an OAR, optionally exclude objects according to their permissions 2011-09-12 20:09:24 +01:00
Justin Clark-Casey (justincc) 517932722b minor: put <remarks> tags around some method doc 2011-09-12 20:06:09 +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) 7531851bec reinstate the validation logging on teleport. A 'fail' of validation still doesn't prevent the actual teleport. 2011-09-10 00:45:50 +01:00
Justin Clark-Casey (justincc) de28c9cd24 Stop the UserManagementModule logging every user it adds for now 2011-09-10 00:23:52 +01:00
Oren Hurvitz 1dd904b78e Delay loading scripts until the scene has finished loading 2011-09-09 23:01:05 +01:00
Micheil Merlin 28961dd1cf llSetPrimitiveParams Prim type params precision errors 2011-09-09 22:53:45 +01:00
Justin Clark-Casey (justincc) bea2e0f32b Comment out the part of the load oar code that zeroes out prim sit target orientations and positions.
The warning about these causing problems is very old and may no longer apply.
Hopes to fix http://opensimulator.org/mantis/view.php?id=5680
2011-09-09 22:50:54 +01:00
Justin Clark-Casey (justincc) 655935db49 Use a copy of the inventory items list to register users in the thread started by GetFolderContent(), to protect ourselves against callers modifying lists
Hopefully this addresses http://opensimulator.org/mantis/view.php?id=5681
2011-09-09 19:55:30 +01:00
Justin Clark-Casey (justincc) 086bf9f15d Save the default terrain texture UUIDs for a new region instead of leaving them as UUID.Zero.
Leaving them at UUID.Zero meant that when a viewer 2 logged into a region that had been freshly created, it received UUID.Zero for these textures, and hence display the land as plain white.
On a simulator restart, the problem would go away since when the database adapators loaded the new region settings, RegionSettings itself has code to use default textures instead of UUID.Zero.
This commit resolves the problem by saving the default texture UUIDs instead of Zero.
However, we currently have to do this in a roundabout way by resaving once the RegionSettings have been created by the database for the first time.  This needless complexity should be addressed.
This change will also have the effect of replacing any existing UUID.Zero terrain textures with the default ones.
However, this shouldn't have any effect since the UUID.Zeros were already being replaced in memory with those same UUIDs.
2011-09-09 00:38:04 +01:00
Justin Clark-Casey (justincc) f5eace6781 Fix test failure. Oversight in setting up the tests themselves. 2011-09-08 21:54:40 +01:00
Justin Clark-Casey (justincc) 9615292133 Centralize module setup for NPC tests.
This is overkill for some tests since they dont' need all the modules, but I think the gain in code readability is worth it
2011-09-08 21:06:10 +01:00
Justin Clark-Casey (justincc) 96a3b68086 Remember to set and unset the fire and forget method at the top of the attachment and npc tests 2011-09-08 20:59:52 +01:00
Justin Clark-Casey (justincc) bd5d2cb043 Use scene presence agent id for rezzed object ownership rather than item owner.
These should be identical.  However, the item isn't available when rezzing npc attachments.
2011-09-08 20:51:52 +01:00
Justin Clark-Casey (justincc) 08bd16285d When invoking any of the OSSL teleport functions, do it on a separate thread rather than the script thread.
This is to prevent the aborting of attachment script threads on teleport from aborting the one actually doing the teleport.
This allows OSSL teleport functions to work when invoked on scripts in attachments (and huds, I assume)
2011-09-07 23:55:41 +01:00
Justin Clark-Casey (justincc) 7cadb89a0f When a region is added to the HG Inventory Broker, also pass this through to the embedded local inventory connector to prevent an NRE when that connector tries to lookup the UserManager through the scene.
This is to address http://opensimulator.org/mantis/view.php?id=5669
However, if this failure was happening I'm kind of surprised that local HG inventory was working at all.....
We probably weren't seeing these exceptions previously because we weren't logging them when the reached the top of a FireAndForget thread.
2011-09-07 23:16:19 +01:00
Justin Clark-Casey (justincc) d7a516d885 Add temporary debugging in HGInventoryBroker and RemoveXInventoryServiceConnector
This is for http://opensimulator.org/mantis/view.php?id=5669
If we can't retrieve an IUserManagement module we complain, and we also warn in the log when its manually set in XISC by HGInventoryBroker
2011-09-06 23:16:37 +01:00
Justin Clark-Casey (justincc) e6cd4defdb Lock m_pendingObjects when calling GetPendingObjectsCount().
This is only called by a region console command.
We should also be locking m_partsUpdateQueue when dequeueing the next part, or locking m_pendingObjects in QueuePartForUpdate().
However, I won't do this now since I don't have time to analyze how this would affect liveness.
2011-09-06 22:48:05 +01:00
Justin Clark-Casey (justincc) 3d4d3427cd Comment out SceneViewer.Reset() and stop calling from Close() since this is useless work as a closed scene object is never reset.
Strictly speaking, we could also stop bothering to clear the m_updateTimes and m_partsUpdateQueue if we are sure that the whole SceneViewer is shortly to be garbage collected anyway, but we'll leave them around for now.
2011-09-06 22:44:34 +01:00