Commit Graph

2152 Commits (28e68329b688b34279c5ff403a6f2b23994b452e)

Author SHA1 Message Date
SignpostMarv 0aa1f1cc3f Implementing PRIM_LINK_TARGET in a non-recursive fashion 2012-08-15 22:58:33 +01:00
SignpostMarv 7679384829 adding ATTACH_*_PEC constants 2012-08-15 22:06:20 +01:00
Melanie ebbf349c6a Let the temp attachment module add a command to allow attaching without permissions and add support for this (incomplete!) to LSL 2012-08-15 19:37:16 +01:00
Justin Clark-Casey (justincc) c42fe6c159 Prevent race conditions when one thread removes an NPC SP before another thread has retreived it after checking whether the NPC exists. 2012-08-14 21:44:06 +01:00
Melanie fe4c3a37c0 Lay some groundwork for temp attachments. Decouple attachments from inventory. 2012-08-14 00:12:15 +01:00
SignpostMarv 58c630c18e attempt at replicating behaviour of llList2thing functions in SL
Committed with changes. Please don't sign comments with your name. Please
don't use your own coding style, use the OpenSim project style. Please
don't modify unrelated whitespace.

Signed-off-by: Melanie <melanie@t-data.com>
2012-08-13 19:17:19 +01:00
Melanie 926c0b90a1 Release http-in URLs when llResetScript is called 2012-08-07 20:48:22 +01:00
Justin Clark-Casey (justincc) 513b77b78d refactor: rename SOG.RezzingObjectID to SOG.FromPartID to match FromFolderID, FromItemID and to reflect that it's a SOP ID rather than a SOG ID. 2012-08-03 02:26:54 +01:00
SignpostMarv cd2c5843a8 reduced-complexity implementation of function to get rezzing object key
Signed-off-by: Melanie <melanie@t-data.com>
2012-08-02 22:12:36 +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
Mic Bowman a76a289d11 Adds support to ScriptModuleComms for region modules to export
constants to the script engine.
2012-07-31 10:45:37 -07:00
Melanie 3f6dfa92ab Return world rotation on llGetObjectDetails()'s OBJECT_ROT 2012-07-29 16:05:35 +01:00
SignpostMarv 72d29bdb40 LSL/OSSL lacks Math.Min & Math.Max implementations. 2012-07-28 00:09:11 +01:00
Justin Clark-Casey (justincc) 1133f81dce Remove a couple of compiler warnings pointed out by SignpostMarv 2012-07-27 20:40:25 +01:00
Justin Clark-Casey (justincc) 5aec0ff207 Move Watchdog and MemoryWatchdog classes into OpenSim.Framework.Monitoring with other monitoring code from OpenSim.Framework 2012-07-25 23:27:00 +01:00
Justin Clark-Casey (justincc) 31304c222d Make SceneManager.OnRegionsReadyStatusChange event available.
This is fired when all regions are ready or when at least one region becomes not ready.
Recently added EventManager.OnRegionReady becomes OnRegionReadyStatusChange to match OnLoginsEnabledStatusChange
2012-07-25 21:00:59 +01:00
Justin Clark-Casey (justincc) ecf7bb268c As per opensim-dev mailing list discussion, extend llGetDetectedType() to return OS_NPC if an OS npc is detected.
The detection will also return agent is the NPC has been created with the OS_NPC_SENSE_AS_AGENT option.
2012-07-20 21:36:33 +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
Mic Bowman a4281ca014 Enables support for UUIDs to be returned in lists from
modInvoke commands.

Thanks SignpostMarv!!!
2012-07-20 10:48:51 -07:00
Mic Bowman 644fb6b013 Implements a very useful OSSL function to test a string to see
if it is a UUID. The function is osIsUUID().

Thanks SignpostMarv!
2012-07-20 10:25:50 -07:00
Justin Clark-Casey (justincc) 1971b6bb4f Stop the 15 second initial script compile wait if a script is being rezzed on a previously empty region. 2012-07-18 22:24:52 +01:00
Justin Clark-Casey (justincc) b9749d5aaf Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-07-17 23:48:53 +01:00
Justin Clark-Casey (justincc) 48a5f10be1 Revert "Revert "refactor: make llGiveInventory() use existing GetInventoryItem() method rather than iterate through TaskInventory itself.""
This reverts commit 59a29f5f22.
The original revert was committed by mistake - it turns out this was not the cause of Mantis 6089

Conflicts:

	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2012-07-17 23:48:09 +01:00
Justin Clark-Casey (justincc) 56870d9609 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-07-17 23:34:50 +01:00
Justin Clark-Casey (justincc) ecb759c1e5 Fix regression where llGiveInventory() had stopped asking non-owner receivers to accept/decline.
This appears to be a regression from back in commit db91044 (Mon Aug 22 2011) where we started to send TaskInventoryOffered msg dialog rather than InventoryOffered dialog.
This is probably correct, but failed because the bucket was too large and because we wouldn't have handled the TaskInventoryDeclined option anyway.
This patch handles both of these and make llGiveInventoryList() use TaskInventoryOffered as well
Fixes http://opensimulator.org/mantis/view.php?id=6089
2012-07-17 23:31:38 +01:00
Justin Clark-Casey (justincc) 59a29f5f22 Revert "refactor: make llGiveInventory() use existing GetInventoryItem() method rather than iterate through TaskInventory itself."
This reverts commit 58b13d51a7.
2012-07-17 22:56:21 +01:00
Melanie c489bc1cd2 Make the scrpt running flag work properly 2012-07-17 15:00:42 +02:00
Melanie 1c3b0da74a Revert "Fix script "Running" behavior"
A better solution using the already present flags must be found.

This reverts commit 6d3ee8bb39.
2012-07-16 23:31:55 +01:00
SignpostMarv ee7478fa16 sending more user-friendly messages to the script error window rather than the thrown exceptions.
Signed-off-by: Melanie <melanie@t-data.com>
2012-07-16 21:32:38 +01:00
SignpostMarv 84b7ae2573 acting on feedback from justincc 2012-07-14 01:45:34 +01:00
SignpostMarv 423101b425 acting on feedback from justincc 2012-07-14 01:45:34 +01:00
SignpostMarv e3453dd9ca added in some extra variables, it sometimes thinks it is on the same parcel :(
Signed-off-by: SignpostMarv <github@signpostmarv.name>
2012-07-14 01:45:34 +01:00
SignpostMarv b6cd3b625e adding workaround for silent failure if position is outside the bounds of a region, implementing parcel prim count check.
Signed-off-by: SignpostMarv <github@signpostmarv.name>
2012-07-14 01:45:34 +01:00
SignpostMarv 8d59385eea Implementation of llSetRegionPos(). Does not implement failure on object entry/prim limit/access restrictions.
Signed-off-by: SignpostMarv <github@signpostmarv.name>
2012-07-14 01:45:34 +01:00
Justin Clark-Casey (justincc) 884d603cac Rather than instantiating a UTF8 encoding everywhere when we want to supress the BOM, use a single Util.UTF8NoBomEncoding.
This class is thread-safe (as evidenced by the provision of the system-wide Encoding.UTF8 which does not suppress BOM on output).
2012-07-13 01:03:28 +01:00
Justin Clark-Casey (justincc) 3b3d9967b1 Remove IClientAPI.GetClientEP() in favour of existing identical IClientAPI.RemoteEndpoint. 2012-07-12 23:29:57 +01:00
Justin Clark-Casey (justincc) 916e3bf886 Where possible, use the system Encoding.ASCII and Encoding.UTF8 rather than constructing fresh copies.
The encodings are thread-safe and already used in such a manner in other places.
This isn't done where Byte Order Mark output is suppressed, since Encoding.UTF8 is constructed to output the BOM.
2012-07-11 22:54:22 +01:00
Justin Clark-Casey (justincc) 33cff9b9d7 Allow XEngine StartDelay to be configured in the [XEngine] config section.
This is only currently meant for use by regression tests that don't have any issues if XEngine is started up quickly, since no other operations will be occuring simultaneously.
Therefore, this is not yet documented externally.
2012-07-11 21:55:18 +01:00
Justin Clark-Casey (justincc) 0e611c47d3 Remove WorldComm module from the regression TestCompileAndStartScript() since the infrastructure no longer fails if this module isn't present, at least on the tested codepaths 2012-07-11 21:46:46 +01:00
Justin Clark-Casey (justincc) fc24563206 Add regression TestDetachScriptedAttachmentToInventory()
This currently only does a relatively crude check for a ScriptState node in the serialized xml
2012-07-11 21:43:35 +01:00
Justin Clark-Casey (justincc) 9f01c3d408 Disable logging in regression test in OSSL_ApiAttachmentTests 2012-07-10 23:04:44 +01:00
Justin Clark-Casey (justincc) eb5ec4a786 If a script is being stopped manually, then give the scriptpool thread 1 second to finish normally before forcibly aborting.
This is to avoid the worst of the problems in mono 2.6, 2.10 where an aborted thread does not always release all its locks.
This very short grace period is identical to the existing behaviour when a script is removed from the scene.
2012-07-10 21:42:51 +01:00
Justin Clark-Casey (justincc) c8af20f966 This script allows an object to be attached directly from prim inventory to another avatar in the scene.
Very useful in serious game/environment scenarios where its only allowed for trusted creators.
Threat level Severe
2012-07-09 23:08:41 +01:00
Justin Clark-Casey (justincc) 16d5b79d57 minor: remove some recent mono compiler warnings 2012-07-07 00:36:01 +01:00
Justin Clark-Casey (justincc) 7ff4eec79c Remove redundant SetScene() function in Scene.AddSceneObject()
This is always done later on in SceneGraph.AddSceneObject() if the call hasn't failed due to sanity checks.
There's no other purpose for this method to exist and it's dangerous/pointless to call in other conditions.
2012-07-07 00:02:45 +01:00
Talun 1b1f841c6a Mantis 6063 osNpcTouch.
Allow NPCS to touch obects.
2012-07-06 22:37:19 +01:00
Justin Clark-Casey (justincc) 8674604ff5 regrade osFormatString, osMatchString and osReplaceString to VeryLow.
I can't see that these present any real hazard to sim functioning.
2012-07-05 21:10:59 +01:00
Justin Clark-Casey (justincc) 951b45b80f Add OSSL function osForceAttachToAvatarFromInventory()
This works like osForceAttachToAvatar() but allows an object to be directly specified from the script object's inventory rather than forcing it to be rezzed in the scene first.
Still only attaches objects to the owner of the script.
This allows one to bypass the complicated co-ordination of first rezzing objects in the scene before attaching them.
Threat level high.
2012-07-05 00:05:06 +01:00
Justin Clark-Casey (justincc) 7b327848d0 Use GetInventoryItem() in llRezAtRoot rather than iterating through a cloned dictionary 2012-07-04 22:21:47 +01:00
Justin Clark-Casey (justincc) 2f998fce1f refactor: In llGetNotecardLine() use existing GetInventoryItem() rather than inspecting a clone of the TaskInventory dictionary that was not cloned thread-safe 2012-07-04 22:00:39 +01:00
Justin Clark-Casey (justincc) 1816ecb747 refactor: In llGetNumberOfNotecardLines() use existing GetInventoryItem() rather than inspecting a clone of the TaskInventory dictionary that was not cloned thread-safe 2012-07-04 21:57:57 +01:00
Justin Clark-Casey (justincc) eacba4fc0b refactor: use existing GetInventoryItem() in GetScriptByName(), itself renamed from ScriptByName() 2012-07-04 21:54:30 +01:00
Justin Clark-Casey (justincc) 9fac7fd932 refactor: In llGetInventoryType() use existing GetInventoryItem() 2012-07-04 21:50:52 +01:00
Justin Clark-Casey (justincc) f2b0377c28 refactor: In llGetInventoryCreator() use existing GetInventoryItem() 2012-07-04 21:49:21 +01:00
Justin Clark-Casey (justincc) d933bdbd59 refactor: In llGetInventoryPermMask() use existing GetInventoryItem() 2012-07-04 21:47:20 +01:00
Justin Clark-Casey (justincc) f9fa34408d refactor: in llGetInventoryPermMask use existing GetInventoryItem() 2012-07-04 21:42:04 +01:00
Justin Clark-Casey (justincc) 857494f6bd refactor: In llRemoteLoadScriptPin() use existing GetInventoryItem() 2012-07-04 21:36:44 +01:00
Justin Clark-Casey (justincc) dff7cae2ee refactor: replace use of LSL_Api.GetTaskInventoryItem() with existing GetInventoryItem() 2012-07-04 21:33:35 +01:00
Justin Clark-Casey (justincc) 0e3fce9b5c refactor: In llGetInventoryKey() use existing GetInventoryItem() 2012-07-04 21:25:58 +01:00
Justin Clark-Casey (justincc) 4b2b14dad1 In llMessageLinked() use GetInventoryItems() rather than cloning TaskInventory directory
GetInventoryItems() returns a new list and so is equivalent, and creates this list under lock whereas Clone() is not thread-safe
2012-07-04 21:22:43 +01:00
Justin Clark-Casey (justincc) 3769739ca7 In llRequestInventoryData() use GetInventoryItems() rather than cloning TaskInventory directory
GetInventoryItems() returns a new list and so is equivalent, and creates this list under lock whereas Clone() is not thread-safe
2012-07-04 21:19:16 +01:00
Justin Clark-Casey (justincc) 3717812ce0 refactor: In llCollisionSound() use existing GetInventoryItem() method rather than have it iterate through TaskInventory itself. 2012-07-04 21:15:00 +01:00
Justin Clark-Casey (justincc) ae64d089c6 refactor: In llRemoveInventory() use existing GetInventoryItem() method rather than have it iterate through TaskInventory itself. 2012-07-04 21:05:51 +01:00
Justin Clark-Casey (justincc) 58b13d51a7 refactor: make llGiveInventory() use existing GetInventoryItem() method rather than iterate through TaskInventory itself. 2012-07-04 20:57:48 +01:00
Melanie d32cf21576 Add preservation of running state of scripts when drag-copying. 2012-07-01 18:30:59 +01:00
Justin Clark-Casey (justincc) bfa6896678 Change AttachmentsModule.DetachSingleAttachmentToInv() to accept a SOG directly instead of an item ID to then shuffle through attachments, saving CPU busywork.
Almost all callers already had the sog to hand.
Still checking that it's really an attachment, but now by inspecting SOG.AttachedAvatar
2012-06-28 23:31:23 +01:00
Justin Clark-Casey (justincc) 972b0b52f9 If rest of first line after colon is blank then still warn about running in XEngine if engine specified does not exist.
This is to take account of situations where the user was intending to specify a script engine using colon using its default language.
This probably generates few false positive as scripts are less likely to end a first line colon with a comment for other purposes.
2012-06-28 21:30:36 +01:00
Justin Clark-Casey (justincc) 25baa2d894 Avoid reporting false positives when a colon is in a comment in the first line of a script where the user was not trying to select a different script engine.
This works by only posting the "Selected engine unavailable" message if we're falling back on XEngine and the language is one handled by XEngine.
In cases where the language is not handled or not allowed, the user will still be notified by the later compiler error.
This avoids the overwhelming majority of false positives where the first line contains a : for other reasons (e.g. source control systems, vim settings, etc.)
Ultimately, I think it would be better to detect script language/engine with a mechanism that didn't just rely on : detection (e.g like #! in unix scripts).
2012-06-28 01:01:18 +01:00
Justin Clark-Casey (justincc) f9769a9fcb minor: reuse colon index calculation in XEngine.OnRezScript. The index if a colon is found on the first line will always be the same as for the whole script. 2012-06-28 00:37:23 +01:00
BlueWall 988112d446 Add stub for llCastRay 2012-06-26 15:15:25 -04:00
BlueWall 6d3ee8bb39 Fix script "Running" behavior
Unchecking "Running" box in script editor now persists. This fixes http://opensimulator.org/mantis/view.php?id=6057
2012-06-23 04:15:14 -04:00
Justin Clark-Casey (justincc) 80a41e670d Avoid race condition between m_PrimObjects iteration in XEngine.PostObjectEvent and places where the list is modified by extending the m_PrimObjects lock. 2012-06-22 02:23:25 +01:00
Justin Clark-Casey (justincc) 9f3feeff8d If starting scripts on initial sim start, provide INFO level log feedback each time 50 scripts have been started.
This is to provide an indication of what's happening now that the default isn't to report every single script start.
Changes XEngine logging level in OpenSim.exe.config from WARN to INFO.
2012-06-22 02:10:27 +01:00
Justin Clark-Casey (justincc) f907182ab2 Eliminate unnecessary extra call to TriggerEmptyScriptCompileQueue in XEngine.DoOnRezScriptQueue()
The later invocation of this function will happen on an empty compile queue.
2012-06-22 01:57:14 +01:00
Justin Clark-Casey (justincc) d24122b706 Add item id, name, prim name and id to log message when state exists but loading fails.
Drop logging about memory limit exceeded to warn from error
2012-06-21 02:24:44 +01:00
Justin Clark-Casey (justincc) afcabf5244 Retrigger build - last jenkins run was glitched 2012-06-21 02:13:03 +01:00
Justin Clark-Casey (justincc) 5709bed548 Add state file location to errors logged when there's some issue with retrieving state (e.g. exceeds memory limit) 2012-06-21 02:09:14 +01:00
Justin Clark-Casey (justincc) 625e5e913a Comment out recently added log message detailing number of scripts started when compile queue empties for now 2012-06-20 00:25:18 +01:00
Justin Clark-Casey (justincc) 881e92a726 Raise some IO associated Exception logging in XEngine to error level, in line with other similar cases.
Remove more unnecessary Close() calls - these are being triggered by the Dispose() called when exiting the using statement for these sdk io objects.
2012-06-20 00:19:50 +01:00
Justin Clark-Casey (justincc) 0fa303b1cf Log how many scripts are candidates for starting and how many are actually started.
Adds DebugLevel infrastructure to XEngine though currently commented out and unused.
2012-06-20 00:10:19 +01:00
Justin Clark-Casey (justincc) ef686ead37 Like the assembly and text files, only write the c#-lsl linemap in XEngine.SetXMLState() if the trust binaries flag is set.
This doesn't affect other locations where the map is written, such as on script compilation.
2012-06-19 02:11:46 +01:00
Justin Clark-Casey (justincc) 8e7032ece8 minor: Add a little more detail to IOException logging in XEngine.SetXMLState()
Also removes superflous Close() commands for statements taking place within using() constructs
Also adds some comment out debug log messages for future use.
2012-06-19 01:53:50 +01:00
Justin Clark-Casey (justincc) 1f34c8277d In the osGetGrid functions, if the [GridInfo] section does not exist then return "Configuration Error", as already happens if there is no GridInfoURI 2012-06-13 04:05:02 +01:00
Melanie 4e18e71089 Committing the Avination implementation of llCastRay. This is a complete rewrite
wich does it's thing independently of physics. Enjoy!
2012-06-13 02:32:25 +01:00
Justin Clark-Casey (justincc) daad0a3e11 Revert "Bind ~ and ! operators in LSL tighter in order to resolve issues in LSL where these aren't evaluated propertly."
This reverts commit a8a9d13dc0.

Accidentally committed, this patch might not be the correct approach.
2012-06-11 23:30:58 +01:00
Justin Clark-Casey (justincc) cbb5ddd944 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-06-11 23:27:48 +01:00
Melanie 71ba85137f Commitig the Avination implementation of llTeleportAgent and
llTeleportAgentGlobalCoords. These do NOT use PERMISSION_TELEPORT like
their SL counterparts because that permission is not yet understood by TPVs
based on v1.x.
2012-06-11 16:45:52 +01:00
Justin Clark-Casey (justincc) a8a9d13dc0 Bind ~ and ! operators in LSL tighter in order to resolve issues in LSL where these aren't evaluated propertly.
Addresses http://opensimulator.org/mantis/view.php?id=3268
2012-06-09 05:11:08 +01:00
Justin Clark-Casey (justincc) 01280e9b94 Remove unused ScenePresence list structure in llGetAgentList() 2012-06-05 00:34:18 +01:00
Justin Clark-Casey (justincc) 7fd38788b4 minor: code formatting from 0b72f773 2012-05-26 02:14:32 +01:00
Talun 0b72f773c7 Mantis 6025 llRequestPermissions auto grant for NPCs.
If the script requesting permissions is owned by either the NPC or
the NPCs owner (if the NPC is created as owned) then grant any
permissions automatically.
2012-05-26 02:09:22 +01:00
Blake.Bourque 33b66009e4 One can now get hyoergrid region co-ordinates with llRequestSimulatorData 2012-05-26 01:32:42 +01:00
Justin Clark-Casey (justincc) d6476b6277 Use GetInventoryItem() in LSL_Api.InventoryKey(string name, int type).
Also removes small bug where calling this method would add 1 to LPS, evne though all callers already did this.
2012-05-26 01:03:53 +01:00
Justin Clark-Casey (justincc) f2a5fad18f Use SceneObjectPartInventory.GetInventoryItem() in OSSL.AvatarStopAnimation instead of searching the task inventory manually. 2012-05-26 00:54:00 +01:00
Justin Clark-Casey (justincc) ff53add54d refactor: replace LSL_Api.InventoryKey(string) largely with SceneObjectPartInventory.GetInventoryItem(string)
Also gets llStopAnimation() to call KeyOrName rather than duplicating logic.
2012-05-26 00:36:01 +01:00
Talun 120f8145fc Mantis 6028 osAvatarStopAnimation not stopping animations via UUID
Corrected to stop animations using the animation UUID similar to llStopAnimation.
See http://opensimulator.org/wiki/OsAvatarStopAnimation
2012-05-25 23:45:03 +01:00
BlueWall 682d4075e3 Fix llGetSimulatorHostname to return configured hostname 2012-05-23 15:08:39 -04:00
Melanie e7819ce909 Port Avination's collision fixes to core. 2012-05-15 01:02:38 +01:00
Chris Koeritz 30a272ba31 Modifications for SMTP in OpenSimulator. Email size limit was fixed (was out of step with documentation at 1024, so boosted to 4096). Added configuration item for maximum email size. Redundant sleep inside email module was fixed (LSL Api was already sleeping). Added sleep time configuration item for snooze between email sending for LSL Api. Added two new configuration items (email_max_size and email_pause_time) into the example OpenSim.ini, plus fixed a spelling error (llimits) and odd tabbing.
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-05-13 17:34:20 -04:00
Talun 61e99bcdcb Mantis 6015 new LSL function llGetAgentList.
Details in the lsl wiki
2012-05-09 00:14:24 +01:00
Justin Clark-Casey (justincc) ef279c5a62 Add automated TestllBreakLink() 2012-05-08 23:36:23 +01:00
Justin Clark-Casey (justincc) c0658a102e Add automated TestllCreateLink() 2012-05-08 23:29:51 +01:00
Justin Clark-Casey (justincc) 6406d5a5b9 refactor: Eliminate local id parameter from api initialize.
This is always available from m_host.LocalId
2012-05-08 23:20:27 +01:00
Justin Clark-Casey (justincc) 01b78235db Instead of constantly looking up unchanging self item in script code, pass in self item on initialization. 2012-05-08 23:05:01 +01:00
Justin Clark-Casey (justincc) a82dc263ab For osGetGridNick(), osGetGridName(), osGetGridLoginURI() and osGetGridCustom(), try to read from the [GridInfoService] section on standalone rather than [GridInfo]
[GridInfoService] is the section that's actually in bin/config-include/StandaloneCommon.ini.example
2012-05-07 19:05:21 +01:00
dahlia 4186fa10f0 remove default values from prior commit since mono cant deal with them 2012-05-07 00:08:56 -07:00
dahlia b697d0e895 add OS_NPC_RUNNING option to osNpcMoveToTarget() to allow running speed for moving NPCs 2012-05-06 23:54:50 -07:00
Snoopy Pfeffer 100e4ca67e Fixes Mantis #5999. llSetLinkPrimitiveParams with PRIM_BUMP_SHINY did cause a runtime error. 2012-05-03 19:00:09 +02:00
TBG Renfold 9c2a73b61e llGenerateKey implementation. Creates a random UUID I.E: UUID.Random().ToString();
Signed-off-by: TBG Renfold <tbg.renfold@g2mv.co.uk>
2012-04-30 17:36:49 +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) 07e62df558 Add regression test for teleporting an agent between separated regions on the same simulator.
This involves a large amount of change in test scene setup code to allow test scenes to share shared modules
SetupScene is now an instance method that requires an instantiation of SceneHelpers, though other SceneHelpers methods are still static
May split these out into separate classes in the future.
2012-04-27 00:58:54 +01:00
Oren Hurvitz 8a65f5a70d OSSL: Removed check for CanRunConsoleCommand() in osKickAvatar.
OSSL permissions are now controlled in OpenSim.ini.
2012-04-26 22:53:13 +01:00
BlueWall fba802bb03 Merge branch 'master' of /home/opensim/var/repo/opensim 2012-04-26 16:13:47 -04:00
Talun b8114d2b67 Add a version of osNpcSay that takes a channel number Mantis 5747
osNpcSay(UUID npc, string message) left untouched

New functions:-
osNpcSay(UUID npc, int channel, string message)
osNpcShout(UUID npc, int channel, string message)
osNpcWhisper(UUID npc, int channel, string message)

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-04-26 16:13:29 -04:00
Melanie 88553bb884 Port Avination link order to make OpenSim behave like SL. Make Primstar scripts work. Fixes Mantis #5990 2012-04-25 19:09:22 +01:00
Oren Hurvitz 2f398231ac Minor improvements to logging
Eliminated an extra newline in the console if the log line doesn't contain a category (example of a category: "[ASSETS]").
2012-04-24 21:38:09 +01:00
Oren Hurvitz 6011bfa5e3 OSSL: fixed the threat level check for osParseJSONNew 2012-04-24 20:41:29 +01:00
Justin Clark-Casey (justincc) 40e37d8b78 Add osForceAttachToAvatar() and osForceDetachFromAvatar()
These behave identically to llAttachToAvatar() and llDetachFromAvatar() except that they do not enforce the PERMISSION_ATTACH check
Intended for use in completely controlled dedicated environments where these checks are more a UI hinderance than a help.
Threat level high.
2012-04-24 00:03:57 +01:00
Justin Clark-Casey (justincc) b798b32b19 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-04-23 22:54:11 +01:00
Justin Clark-Casey (justincc) 1f8d1bcdcf Replace common code to fetch self inventory item (as opposed to uuid) with GetSelfInventoryItem()
However, at some point it would be far more convenient to receive the TaskInventoryItem in the constructor rather than just the item UUID, so we don't have to constantly refetch our self item.
2012-04-23 22:52:46 +01:00
Justin Clark-Casey (justincc) 60065f06b3 refactor: Replace calls to InventorySelf() with existing m_itemID in LSL_Api
There's no point look up an item ID that we already have.
2012-04-23 22:23:47 +01:00
Talun 679da63da6 Mantis 5977 Corrections to llRegionSayTo
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-04-23 07:16:33 -04:00
Melanie beb7b8d189 Fix a logic error in app domain creation 2012-04-18 23:23:37 +01:00
Melanie ea73a03553 Don't re-add the assembly resolver for each script if not creating the appdomain 2012-04-18 20:01:41 +01:00
Justin Clark-Casey (justincc) 24a0cc5261 refactor: Rename EstateSettings.IsEstateManager() to EstateSettings.IsEstateManagerOrOwner() to reflect what it actually does.
This makes it consistent with other parts of OpenSimulator that are treating ESTATE_MANAGER and ESTATE_OWNER as different entities.
As per opensim-dev mailing list.
2012-04-17 01:25:41 +01:00
Talun 5655239f44 Null reference in llGetObjectMass on a seated avatar. 2012-04-17 00:56:46 +01:00
Melanie 4bdd9d51bc Correct whitespace error introduced by previous commit 2012-04-14 01:04:26 +01:00
Talun 4d652c7041 Missing or unimplemented LSL memory functions.
Implemented to behave as if scripts were LSO.

Signed-off-by: nebadon <michael@osgrid.org>
2012-04-13 17:08:00 -07:00
Justin Clark-Casey (justincc) eced091689 Change threat level of osNpcStopMoveToTarget from Low to High to match other NPC functions, and change OSSL permissions name to osNpcStopMoveToTarget instead of osNpcStopMoveTo
Thanks to Oren Hurvitz for pointing out these mistakes.
2012-04-13 22:52:24 +01:00
Justin Clark-Casey (justincc) 1ad3fdb40b Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-04-13 22:34:36 +01:00
Justin Clark-Casey (justincc) ab7c0e7547 Remove hardcoded god requirement from osSetRegionWaterHeight, osSetRegionSunSettings and, osSetEstateSunSettings no matter the threat level.
Change threat level on osSetRegionSunSettings and osSetEstateSunSettings from nuisance to high to match similar functions.
If you had enabled these functions but had relied on the hardcoded god check in the code, then please adjust your OSSL permissions config.
Thanks to Oren Hurvitz for pointing this out.
2012-04-13 22:32:33 +01:00
Talun 08e509978d Mantis 55025 Implement script time.
Signed-off-by: nebadon <michael@osgrid.org>
2012-04-12 18:44:00 -07:00
Snoopy Pfeffer 78fd487a70 New OS scripting functions osSetTerrainTexture and osSetTerrainHeight as originally proposed in SL Jira (https://jira.secondlife.com/browse/SVC-244). 2012-04-10 21:49:43 +02:00
Talun 78c0028179 Mantis5502 implementation of some of the new constants
Signed-off-by: Melanie <melanie@t-data.com>
2012-04-09 21:25:22 +01:00
Justin Clark-Casey (justincc) 7d8bb33c5b Store FromItemID for attachments once on SOG instead of on every SOP and only ever using the root part entry.
This eliminates some pointless memory use.
2012-04-07 00:33:02 +01:00
Justin Clark-Casey (justincc) 33e91f1088 Implement PRIM_POS_LOCAL on llSetPrimitiveParams() and other prim params LSL functions.
This is the same as PRIM_POSITION
2012-04-06 23:43:03 +01:00
Justin Clark-Casey (justincc) 4a58d4c5a4 refactor: Use clearer part.ParentGroup.IsAttachment in LSL_Api.GetPartLocalPos() 2012-04-06 23:36:13 +01:00
Justin Clark-Casey (justincc) 3af1cd65f9 Fix llGetLinkPrimParams for PRIM_POS_LOCAL for child prims whether in scene or attachments.
Return relative position to root prim rather than 0,0,0.
Should fix same issue with llGetLocalPos()
http://opensimulator.org/mantis/view.php?id=5951
2012-04-06 22:41:35 +01:00
Justin Clark-Casey (justincc) 47108bb351 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-04-06 21:15:31 +01:00
Justin Clark-Casey (justincc) f2903db390 For llGetMass(), return the mass of the avatar is the object is attached.
As per http://lslwiki.net/lslwiki/wakka.php?wakka=llGetMass
This is the mass as used by the physics engine (ODE or Bullet).
2012-04-06 21:14:19 +01:00
Talun c3a8c00ce0 Addition of missing constants for llGetObjectDetails including for Mantis 5502
Signed-off-by: nebadon <michael@osgrid.org>
2012-04-06 12:42:46 -07:00
Justin Clark-Casey (justincc) 627efc172b Make llGetMass() return total mass of object when called on root prim.
As per http://lslwiki.net/lslwiki/wakka.php?wakka=llGetMass
Aims to resolve http://opensimulator.org/mantis/view.php?id=5954
2012-04-06 20:32:39 +01:00
Justin Clark-Casey (justincc) e480e25d8b Fix more SOP.PhysActor race conditions in LSL_Api 2012-04-03 06:01:05 +01:00
Justin Clark-Casey (justincc) f0406f9fe2 Rename SOG.HasChildPrim(uint) to SOG.ContainsPart(uint) to match existing ContainsPart method and remove method duplication.
HasChildPrim is also misleading since the 'root' prim can also be returned.
2012-03-31 01:45:37 +01:00
Snoopy Pfeffer 19837ff4dd Two new scripting functions osInviteToGroup(userID) and osEjectFromGroup(userID) that invite/eject users to/from groups the object containing the script is set to. These functions also work for closed groups. 2012-03-27 22:30:02 +02:00
Snoopy Pfeffer 7223b63563 User level based restrictions for HyperGrid teleports, asset uploads, group creations and getting contacted from other grids. Incoming HyperGrid teleports can also be restricted to local users. 2012-03-27 22:09:58 +02:00
Melanie 7e0936e4b6 Add a hust UUID to the script invocations 2012-03-26 14:19:55 +01:00
Mic Bowman a14437ad5a Add support for key, vector, rotation and list types for both
arguments and return values to the modInvoke family of functions.

See http://opensimulator.org/wiki/OSSL_Script_Library/ModInvoke
2012-03-24 22:43:42 -07:00
nebadon 6b87a29c86 fix yield prolog so it compiles with mono 2.11 there has been a bugzilla
report files with mono project in regards to this change, this simply
lets us move forward with using mono 2.11 for now :
https://bugzilla.xamarin.com/show_bug.cgi?id=4052
2012-03-23 02:22:57 -07:00
Justin Clark-Casey (justincc) 760010d6fb Fix llGiveInventory() so that it checks the destination part for AllowInventoryDrop, not the source.
This allows llAllowInventoryDrop() to work.
Regression test added for this case.
2012-03-22 22:33:37 +00:00
Justin Clark-Casey (justincc) c4b2d24f33 Add llGiveInventory() test from object to object where both objects are owned by the same user. 2012-03-22 22:17:07 +00:00
Justin Clark-Casey (justincc) 9949ac2f9f refactor: Rename AvatarAnimations -> DefaultAvatarAnimations for code clarity since non-default animations are handled completely separately from this class 2012-03-22 00:10:41 +00:00
Justin Clark-Casey (justincc) 1a8769e6ef Instead of loading default avatar animations in both SLUtil and AvatarAnimations, load just in AvatarAnimations instead.
This lets us remove the dependency of OpenSim.Framework.dll on data/avataranimations.xml, which is not necessary for ROBUST.
This commit also takes care of the odd situation where animations are stored and used internally with uppercase names (e.g. "STAND")
but scripts refer to them with lowercase names (e.g. "sit").
2012-03-21 23:57:39 +00:00
Justin Clark-Casey (justincc) 437f18bc41 Stop console command "xengine status" throwing an exception if there are no scripts in a region.
Addresses http://opensimulator.org/mantis/view.php?id=5940
2012-03-19 21:43:23 +00:00
Justin Clark-Casey (justincc) 4a57112f19 Add osGetInventoryDesc() as per http://opensimulator.org/mantis/view.php?id=5927
This allows one to get description data for a given prim inventory item.
Thanks MarcelEdward and GuduleLapointe!
2012-03-17 04:02:23 +00:00
Justin Clark-Casey (justincc) 9497a7c7bd refactor: separate out console and status report generation parts of XEngine 2012-03-16 03:32:14 +00:00
Justin Clark-Casey (justincc) c386b68373 Aggregate script execution times by linksets rather than individual prims.
This is for the top scripts report.
2012-03-16 01:31:53 +00:00
Justin Clark-Casey (justincc) a4b01ef38a Replace script-lines-per-second with the script execution time scaled by its measurement period and an idealised frame time.
The previous lines-per-second measurement used for top scripts report was inaccurate, since lines executed does not reflect time taken to execute.
Also, every fetch of the report would reset all the numbers limiting its usefulness and we weren't even guaranteed to see the top 100.
The actual measurement value should be script execution time per frame but XEngine does not work this way.
Therefore, we use actual script execution time scaled by the measurement period and an idealised frame time.
This is still not ideal but gives reasonable results and allows scripts to be compared.
This commit moves script execution time calculations from SceneGraph into IScriptModule implementations.
2012-03-16 00:34:30 +00:00
Mic Bowman 8b5298a62e Protect the scriptmodulecomms interface. 2012-03-15 13:37:43 -07:00
Mic Bowman 402ff75d78 Adds a new script command 'modInvoke' to invoke registered functions
from region modules. The LSL translator is extended to generate the
modInvoke format of commands for directly inlined function calls.

A region module can register a function Test() with the name "Test".
LSL code can call that function as "Test()". The compiler will translate
that invocation into modInvoke("Test", ...)
2012-03-15 13:16:02 -07:00
Justin Clark-Casey (justincc) acb1355ff2 Remove property/field duplication in ScriptInstance where it's unnecessary. 2012-03-15 02:02:31 +00:00
Justin Clark-Casey (justincc) 2d32401e23 Simplify some logic in the ScriptInstance constructor - running is set to false in both if/else branches 2012-03-15 01:32:16 +00:00
Justin Clark-Casey (justincc) f0c1746063 minor: correct indentation levels 2012-03-15 01:26:38 +00:00
Justin Clark-Casey (justincc) 5ddda89238 Remove duplication of m_RunEvents and Running 2012-03-15 00:48:44 +00:00
Justin Clark-Casey (justincc) 2f81e53f63 Fix a problem where multiple near simultaneous calls to llDie() from multiple scripts in the same linkset can cause unnecessary thread aborts.
The first llDie() could lock Scene.m_deleting_scene_object.
The second llDie() would then wait at this lock.
The first llDie() would go on to remove the second script but always abort it since the second script's WorkItem would not go away.
Easiest solution here is to remove the m_deleting_scene_object since it's no longer justified - we no longer lock m_parts but take a copy instead.
This also requires an adjustment in XEngine.OnRemoveScript not to use instance.ObjectID instead when firing the OnObjectRemoved event.
2012-03-15 00:20:47 +00:00
Justin Clark-Casey (justincc) 12cebb12d5 Alleviate an issue where calling Thread.Abort() on script WorkItems can fail to release locks, resulting in a crippled simulator.
This seems to be a particular problem with ReaderWriterLockSlim, though other locks can be affected as well.
It has been seen to happen when llDie() is called in a linkset running more than one script.
Alleviation here means supplying a ScriptInstance.Stop() timeout of 1000ms rather than 0ms, to give events a chance to complete.
Also, we check the IsRunning status at the top of the ScriptInstance.EventProcessor() so that another event doesn't start in the mean time.
Ultimately, a better solution may have to be found since a long-running event would still exceed the timeout and be aborted.
2012-03-15 00:06:52 +00:00
Justin Clark-Casey (justincc) 95ec96bf86 refactor: rename ScriptInstance.m_CurrentResult to m_CurrentWorkItem to make it more understandable as to what it is and what it does (hold a thread pool work item for a waiting of in-progress event)
Also add other various illustrative comments
2012-03-14 00:29:36 +00:00
Justin Clark-Casey (justincc) 25592bbd85 Add max thread and min thread information to "xengine status" region console command 2012-03-12 21:16:05 +00:00
Diva Canto 824eb7ed20 Added osGetGridGatekeeperURI() 2012-03-10 19:51:28 -08:00
Justin Clark-Casey (justincc) 94e58ff6b9 Use SP.ParentPart instead of ParentID in places where it's more efficient (saving extra null checks, etc.)
However, it looks like we should retain SP.ParentID since it's much easier to use that in places where another thread could change ParentPart to null.
Otherwise one has to clumsily put ParentPart in a reference, etc. to avoid a race.
2012-03-09 02:38:11 +00:00
Melanie 42a7a85062 FireAndForget scripted rez - port from Avination 2012-03-09 00:57:49 +00:00
Justin Clark-Casey (justincc) 749c3fef8a Change "help" to display categories/module list then "help <category/module>" to display commands in a category.
This is to deal with the hundred lines of command splurge when one previously typed "help"
Modelled somewhat on the mysql console
One can still type help <command> to get per command help at any point.
Categories capitalized to avoid conflict with the all-lowercase commands (except for commander system, as of yet).
Does not affect command parsing or any other aspects of the console apart from the help system.
Backwards compatible with existing modules.
2012-03-08 01:51:37 +00: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) b3449e998a Fix TestSyntaxError() and TestSyntaxErrorDeclaringVariableInForLoop()
They were all failing assertions but the exceptions these threw were caught as expected Exceptions.
I don't think we can easily distinguish these from the Exceptions that we're expecting.
So for now we'll do some messy manually checking with boolean setting instead.
This patch also corrects the assertions themselves.
2012-03-06 02:30:22 +00:00
Justin Clark-Casey (justincc) a92153ed88 Get all test methods in OpenSim.Region.ScriptEngine.Tests.dll to report that they're running 2012-03-06 02:21:19 +00:00
Justin Clark-Casey (justincc) 85198a45cb Fix off by one error in script error reporting. 2012-03-06 02:01:47 +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
Mic Bowman 8a375f3c30 Adds an OSSL command for regular expression-based string replacement. Parameters
are osReplaceString(string source, string patter, string replace, integer count, integer start)
The count parameter specifies the total number of replacements to make, -1 makes
all replacements.
2012-03-01 14:49:49 -08:00
BlueWall a2b0ed537e Fix indexing on string trim
Thanks to zadark for pointing this out,
	smxy for deciphering the ?: operator and
	Plugh for the fix \o/ yay for IRC
2012-03-01 14:18:48 -05:00
PixelTomsen 01f454242d PRIM_SCULPT_FLAG_INVERT, PRIM_SCULPT_FLAG_MIRROR implemented
http://opensimulator.org/mantis/view.php?id=5763
2012-02-25 15:33:33 +00:00
PixelTomsen 7b5e42c744 llGetLinkMedia, llSetLinkMedia, llClearLinkMedia implementation mantis: http://opensimulator.org/mantis/view.php?id=5756 http://opensimulator.org/mantis/view.php?id=5755 http://opensimulator.org/mantis/view.php?id=5754 2012-02-24 23:10:41 +00:00
Justin Clark-Casey (justincc) f67f37074f Stop spurious scene loop startup timeout alarms for scenes with many prims.
On the first frame, all startup scene objects are added to the physics scene.
This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame.
This commit also slightly changes the behaviour of timeout reporting.
Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check.
Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
2012-02-24 05:02:33 +00:00
Justin Clark-Casey (justincc) fe229f10e6 In osSetSpeed(), if no avatar for a uuid is found then don't attempt to set speed. 2012-02-24 04:08:59 +00:00
PixelTomsen 0b9f4d7e74 llLinkSitTarget implementation http://wiki.secondlife.com/wiki/LlLinkSitTarget 2012-02-24 00:58:11 +00:00
PixelTomsen 1c533eb520 Fix:LINK_ROOT flag for llGetLinkName() by SinglePrim 2012-02-21 23:15:33 +00:00
Justin Clark-Casey (justincc) 972f73ed2b Make osNpcStopAnimation() call AvatarStopAnimation() rather than AvatarPlayAnimation() 2012-02-17 02:53:12 +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) dbe32a1f6d minor: put in commented out logging statements for future reuse 2012-02-09 00:10:45 +00:00
Justin Clark-Casey (justincc) 038d1bf742 Add a regression test to compile and start a script. Remove Path.GetDirectoryName when getting assembly loading path in Compiler.CompileFromDotNetText().
The Path.GetDirectoryName call in Compiler.CompileFromDotNetText is unnecessary since AppDomain.CurrentDomain.BaseDirectory is always a directory.
Later path concatenation is already done by Path.Combine() which handles any trailing slash.
Removing Path.GetDirectoryName() will not affect the runtime but allows NUnit to work since it doesn't add a trailing slash to AppDomain.CurrentDomain.BaseDirectory.
2012-02-07 17:44:37 +00:00
Justin Clark-Casey (justincc) edc11a1d39 Add missing RCERR_UNKNOWN and RCERR_SIM_PERF_LOW LSL constants that would eventually be used by llCastRay(), though OpenSim does not use these yet. 2012-02-04 01:04:00 +00:00
Justin Clark-Casey (justincc) 09d6521361 Correct RC_* LSL constants used by llCastRay().
Many thanks to WhiteStar for doing the research on this.
2012-02-04 01:00:11 +00:00
Melanie 76a658324c Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-02-03 00:07:23 +00:00
Melanie 447a66d660 Replace ParcelAccessEntry with a new struct, LandAccessEntry, which more
accurately reflects the data sent by the viewer. Add times bans and the
expiration of timed bans.
Warning: Contains a Migration (and nuts)
2012-02-02 23:40:56 +00:00
Justin Clark-Casey (justincc) 54d473e200 D'oh - we want to call llGetLinkNumberOfSides() in the LSL_Stub, not llGetLinkNumber(). 2012-02-02 23:35:16 +00:00
Justin Clark-Casey (justincc) 264c83aec4 Add llGetLinkNumberOfSides to LSL_Stub and ILSL_Api
It already existed in LSL_Api but it also needs to exist in these two other places for a script to be able to see it.
Hopefully resolves http://opensimulator.org/mantis/view.php?id=5489
2012-02-02 22:48:36 +00:00
Justin Clark-Casey (justincc) 99e71222f0 Lay out script status in property per row format, since getting too long for console lines. 2012-02-01 00:27:42 +00:00