Commit Graph

47 Commits (28e68329b688b34279c5ff403a6f2b23994b452e)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 2563553f80 Add "show script timers" command to show script timers. For debug purposes.
Also, "show sensors" changes to "show script sensors".
2013-01-25 23:49:06 +00:00
Justin Clark-Casey (justincc) 9ddddde42e Add "show sensors" command to show script sensor information for debug purposes. 2013-01-25 23:48:59 +00:00
SignpostMarv ffdde05bb7 constructor means not having to manually refer to individual properties 2012-08-18 18:29:59 +01:00
SignpostMarv 5d7751da89 refactoring for Vector3 operator & constructor tweaks 2012-08-18 13:21:55 +01:00
Justin Clark-Casey (justincc) 794363421d Look up the NPC module when the SensorRepeat class is created, rather than on every single sensor sweep. 2012-08-01 00:39:37 +01:00
Justin Clark-Casey (justincc) 7609daca38 Resolve a deadlock between INPCModule and SensorRepeat by replacing the SensorRepeat list with a new list on add/removes rather than locking it for the duration of the sensor sweep.
A deadlock was observed today where NPC removal on a script thread would lock the NPC list and then try to lock the sensor list via scripted attachment removal.
Concurrently, the sensor sweep thread would lock the sensor list and then try to lock the NPC list to check NPC status.
This commit resolves the deadlock by replacing the sensor list on update rather than locking it for the duration of the sweep.
2012-07-31 23:57:57 +01:00
Justin Clark-Casey (justincc) bcfc392edf As per opensim-dev mailing list conversation, introduce OS_NPC constant for use with llSensor()
This same constant will later be used with llGetDetectedType().
This constant has a different name from NPC to avoid possible conflict with future LSL changes.
This constant has a different value to try and avoid unnecessary conflict with future constants that may use the same value.
Using the 'NPC' constant with llSensor() will remain valid but is deprecated.
2012-07-20 21:08:04 +01:00
Justin Clark-Casey (justincc) e39e4f6bfb minor: style adjustments in SensorRepeat, mainly related to patch from stoehr 2012-04-27 19:40:19 +01:00
Stefan_Boom b35a1d5681 Fixing wrong position of llSensor, SensePoint wasnt following the rotation of the root prim. 2012-04-27 19:31:50 +01:00
Justin Clark-Casey (justincc) 98251cdab3 Add sensor, dataserver requests, timer and listener counts to "xengine status" command.
This is for diagnostic purposes.
2012-03-06 23:21:17 +00:00
Justin Clark-Casey (justincc) d8c4985527 Move SenseRepeaters.Count check inside the SenseRepeatListLock.
No methods in the List class are thread safe in the MS specification/documentation
2012-03-02 00:28:37 +00:00
Justin Clark-Casey (justincc) dcfd05c8ea lock SenseRepeatListLock when added a new sensor during script reconstitution.
This is already being done in the other place where a sensor is added.
Adding a sensor whilst another thread is iterating over the sensor list can cause a concurrency exception.
2012-03-02 00:22:23 +00:00
Justin Clark-Casey (justincc) c906128191 Fix some logic mistakes where firstly osNpcCreate() without options was creating npcs sensed as agents and secondly the OS_NPC_SENSE_AS_AGENT option was having the opposite effect.
Hopefully makes progress on addressing http://opensimulator.org/mantis/view.php?id=5872
2012-02-16 00:22:39 +00:00
Justin Clark-Casey (justincc) b3d152f3ba Fix an npc delete race condition with LSL sensors where an initial presence check could succeed but then the npc removed before the subequent npc check.
The resulting null would cause an exception.  We now check for null before looking at SenseAsAgent.
Hopefully fixes http://opensimulator.org/mantis/view.php?id=5872
2012-02-10 21:26:05 +00:00
Justin Clark-Casey (justincc) 7837c611fb Add OS_NPC_SENSE_AS_AGENT option to osNpcCreate().
This allows NPCs to be sensed as agents by LSL sensors rather than as a specific NPC type (which is currently an OpenSimulator-only extension).
Wiki doc on this and other recent NPC functions will follow soon
2012-01-28 00:00:12 +00:00
Justin Clark-Casey (justincc) d27dd3714f Allow all NPCs to show up on sensors as all osNpc* script methods now check for ownership permission before executing.
As per #opensim-dev irc discussion.
2012-01-12 19:19:34 +00:00
Melanie 7518b075b7 Add osNpcCreateOwned to create an owned NPC. Those can be sensed only by the owner, can be destroyed only by the owner and only the owner can save their appearance. Added "NPC" as a flag to llSensor to sense NPCs and exclude them from "AGENT" results. 2012-01-06 22:35:06 +00:00
Justin Clark-Casey (justincc) 4efd9a3b7b When removing an LSL sensor for a script (e.g. through llResetScript() or state change), don't also remove sensors for other scripts in the same prim.
Hopefully fixes http://opensimulator.org/mantis/view.php?id=4448 and http://opensimulator.org/mantis/view.php?id=4452
2011-11-26 01:55:36 +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) 33a894f3d2 refactor: move SOP.IsAttachment and AttachmentPoint up into SOG to avoid pointless duplication of identical values 2011-08-27 00:15:21 +01:00
Justin Clark-Casey (justincc) 15a514fcbc refactor: simplify SOP.AttachedAvatar into SOG.AttachedAvatar
This does a tiny bit to reduce code complexity, memory requirement and the cpu time of pointlessly setting this field to the same value in every SOP
2011-08-26 23:06:41 +01:00
Justin Clark-Casey (justincc) 66004a9375 If an llSensor() is in an attachment, make the detection cone face in the direction of the avatar, not the relative rotation of the attachment towards the avatar.
This is effectively a copy/paste from 459323a, which should be refactored sometime.
This seems the obvious problem from field reports but I have not tested the fix myself.  Feedback welcome.
2011-06-03 23:43:09 +01:00
Melanie abea0c74c2 Add support for the new display name related functions in LSL. This does not
implement the display names functionality as such, but it allows scripts
that are display name aware to function as if the display name were implemented
and set to the avatar name.
2011-04-08 04:19:17 +01:00
Jeff Ames f1f0bc23f4 Formatting cleanup. 2010-09-12 13:43:49 -04:00
John Hurliman dd277a0d02 First pass at cleaning up thread safety in EntityManager and SceneGraph 2010-09-10 12:04:12 -07:00
Melanie 31dc77d8a1 Return agents when angle is PI
Fixes Mantis #4703
2010-05-10 04:02:56 +01:00
Melanie 459323a931 Make the detection cone in attachments face in the direction of the avatar,
not the relative rotation of the attachment towards the avatar.
2010-04-21 19:44:19 +01:00
Dan Lake 62e0b53ca4 Renamed TryGetAvatar to TryGetScenePresence on SceneManager, SceneBase, Scene and SceneGraph. This was the only change in this patch to keep it isolated from other recent changes to the same set of files. 2010-03-19 15:16:44 -07:00
Dan Lake 859bc717a4 Cleaned up access to scenepresences in scenegraph. GetScenePresences and GetAvatars have been removed to consolidate locking and iteration within SceneGraph. All callers which used these to then iterate over presences have been refactored to instead pass their delegates to Scene.ForEachScenePresence(Action<ScenePresence>). 2010-03-19 15:16:35 -07:00
Diva Canto c5ea783526 OpenSim/Framework/Communications/Cache deleted. LibraryRootFolder deleted. 2010-01-11 07:51:33 -08:00
unknown 71c929137f Inconsistent locking of SenseRepeaters in Script Engine.
When I attempt to 'save oar' on a region with thousands of scripts with timers, I get a NullReferenceException every time. The problem comes from inconsistent locking in SensorRepeat.cs of the SenseRepeaters List. It is iterated and modified in many places and these places are all wrapped in a lock except in the GetSerializationData(). This is the function throwing the exception because an item in the list becomes null during iteration.

The attached patch locks SenseRepeatListLock in GetSerializationData()
2009-10-23 11:25:06 +01:00
John Hurliman 588361e2a2 Experimental change to use an immutable array for iterating ScenePresences, avoiding locking and copying the list each time it is accessed 2009-10-23 01:02:36 -07:00
Jeff Ames 840de6c036 Minor: Change OpenSim to OpenSimulator in older copyright headers and LICENSE.txt. 2009-06-01 06:37:14 +00:00
Justin Clarke Casey 513ae92bbb * Apply http://opensimulator.org/mantis/view.php?id=3406
* Makes Second Life environment sensor ranges and maximum response number configurable
* Thanks Intimidated
2009-04-07 19:15:26 +00:00
Dr Scofield 9b66108081 This changeset is the step 1 of 2 in refactoring
OpenSim.Region.Environment into a "framework" part and a modules only
part. This first changeset refactors OpenSim.Region.Environment.Scenes,
OpenSim.Region.Environment.Interfaces, and OpenSim.Region.Interfaces
into OpenSim.Region.Framework.{Interfaces,Scenes} leaving only region
modules in OpenSim.Region.Environment.

The next step will be to move region modules up from
OpenSim.Region.Environment.Modules to OpenSim.Region.CoreModules and
then sort out which modules are really core modules and which should
move out to forge.

I've been very careful to NOT BREAK anything. i hope i've
succeeded. as this is the work of a whole week i hope i managed to
keep track with the applied patches of the last week --- could any of
you that did check in stuff have a look at whether it survived? thx!
2009-02-06 16:55:34 +00:00
idb 1a14066aa6 Speed improvement mostly when sensing objects especially noticeable in a sim with many objects. 2009-01-31 19:02:09 +00:00
idb b0cb272d12 Remove the addition of the region coordinates to obtain the absolute position of a prim/person on the grid. I believe it is superfluous and removes needed decimal places for short range sensors.
Fixes Manitis #3046
2009-01-25 21:13:42 +00:00
Justin Clarke Casey 915593bfbc * refactor: Rip out SOP inventory from the partial into a separate class
* SceneObjectPartInventory.cs isn't a particularly good name but it's probably not got a long life
* A proper inventory interface to follow
* Parallel changes for other inventory partial classes to follow at a later date
2008-11-21 21:16:42 +00:00
Homer Horwitz d77ebb5761 Thanks, idb, for a patch that fixes Mantis#2400:
llSensor() range ignored with AGENT.
2008-10-15 20:49:28 +00:00
Justin Clarke Casey 9d6f043a79 * Remove warnings, including one which pointed out a bug 2008-10-13 20:45:13 +00:00
Justin Clarke Casey 4e3bc9a63e * Apply http://opensimulator.org/mantis/view.php?id=2373
* Many llSensor() improvements, though sensoring isn't perfect yet
* thanks idb!
2008-10-09 22:41:07 +00:00
Charles Krinke e87195d1bd Mantis#1906. Thank you kindly, Idb for a patch that:
Removed cache accesses to obtain sensed object/avatar 
name, it is already available.
2008-10-08 01:44:35 +00:00
Melanie Thielker f3c8963c86 Convergence is almost complete. This brings the diff between the API to < 10k
and makes it use a common set of types in both engine. Fixes the issues with
running both engines and HTTP requests / listens / timers etc..
Also fixes a couple of minor Scene issues and a CTB by nullref.
2008-09-25 05:13:44 +00:00
Teravus Ovares 7d89e12293 * This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point.  Regular people should let the dust settle.
* This has been tested to work with most basic functions. However..   make sure you back up 'everything' before using this.  It's that big!  
* Essentially we're back at square 1 in the testing phase..  so lets identify things that broke.
2008-09-06 07:52:41 +00:00
Melanie Thielker 328ab79b78 Refactor a lot of direct calls to OGS1 to use the cached version instead.
Scripts can now no longer DOS the user server and there are a lot fewer
gratuitious lookups of user profile data.
2008-08-16 02:00:36 +00:00
lbsa71 6b7930104b * Applied patch from Melanie, mantis issue #1581 - "Refactor LSL language, api and compiler out of XEngine"
"First stage in a major Script Engine refactor, that will result in the LSL implementaions ebing reconverged. Not there yet, but one major part is done."
Thank you, Melanie!
2008-06-24 21:09:49 +00:00