Commit Graph

2279 Commits (6f5fd067a5f6edbd2c472bfb20351d511793fe66)

Author SHA1 Message Date
SignpostMarv 597df51f91 the simplest case for llGetLinkName also applies to the LINK_THIS constant 2012-10-19 02:48:59 +01:00
SignpostMarv ec044537d5 ensuring that operand order in llGetLinkName is internally consistent 2012-10-19 02:48:59 +01:00
Justin Clark-Casey (justincc) ab0294f010 Add missing category paremeter to llGiveInventoryList grid IM construction.
This was a regression from 16c9c1df Sat Oct 6 02:34:49 2012 +0100.
Should resolve http://opensimulator.org/mantis/view.php?id=6360
2012-10-16 01:33:35 +01:00
Justin Clark-Casey (justincc) 330b976a62 Improve on TBG Renfold's fix to llRequestSimulatorData DATA_SIM_POS by only performing HG regionflags service check if the region secret is not empty.
An empty RegionSecret is never HG, whilst a non-empty one may be HG or being genuinely used as a RegionSecret.
2012-10-13 01:03:09 +01:00
TBG Renfold f6e166cd0b Now using region flags for llRequestSimulatorData DATA_SIM_POS.
If the region is not classed a hypergrid region, then the region secret is checked to make sure that it is a valid UUID.

Just a temporary fix at this time.
2012-10-13 00:50:34 +01:00
Justin Clark-Casey (justincc) 756ac4f321 Correct osSetContentType() threat check to query osSetContentType rather than osSetResponseType 2012-10-10 01:39:47 +01:00
Justin Clark-Casey (justincc) 11d8119a21 Remove osDropAttachment threat level check wrongly placed in OSSL_Api.ShoutErrorOnLackingOwnerPerms. 2012-10-10 01:37:57 +01:00
Justin Clark-Casey (justincc) 16c9c1dff7 On receiving TaskInventoryAccepted with a destination folder in the binary bucket slot for RLV, notify the viewer about inventory folder updates.
The viewer would not see the folder move without this, either on accept or decline.
This commit also updates the TaskInventoryOffered message to better conform with the data LL uses
Changes are, agentID is prim owner rather than prim id, agent name is now simply object name rather than name with owner detail,
message is just folder name in single quotes, message is not timestamped.
However, folder is not renamed "still #RLV/~<name>".  Long term solution is probably not to do these operations server-side.
Notes will be added to http://opensimulator.org/mantis/view.php?id=6311
2012-10-06 02:34:49 +01:00
Melanie 653a98e891 Fix a viewer crash issue
Conflicts:

	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2012-10-03 17:39:13 +01:00
SignpostMarv a1679517d3 correcting typo 2012-10-02 22:14:47 +01:00
SignpostMarv f555febdb7 taking into account the recent introduction of implicit operators 2012-10-02 22:14:46 +01:00
SignpostMarv ce7694c108 added perms checking, duplicated functionality to methods that do not require perms and have higher threat level 2012-10-02 22:14:46 +01:00
SignpostMarv c677c04f10 fixing copypasta 2012-10-02 22:14:46 +01:00
SignpostMarv 35b7c80e0b implementing osDropAttachment & osDropAttachmentAt 2012-10-02 22:14:46 +01:00
Melanie 54ec8b197b Add money event routing to the script engine. 2012-10-02 01:25:55 +01:00
Melanie 14b659e550 Send money() events to the clicked prim. Reverting a change I made over a year ago. 2012-10-02 01:17:46 +01:00
Justin Clark-Casey (justincc) 5df3944607 Fix llListFindList() returning no match when there is a match with a script constant component in the source list.
Adds regression test for this case.
Based on http://opensimulator.org/mantis/view.php?id=6156
Thanks SignpostMarv.
2012-09-22 00:23:25 +01:00
SignpostMarv 8db5d79f4b passing in the function name to MOD_Api.ConvertFromLSL for more user-friendly error messages 2012-09-10 13:15:32 +01:00
SignpostMarv e041f09750 refactoring to allow Scene.GetLandData to accept Vector3 as an argument. Note that the prior work on LSL_Vector implicit operators means one does not need to explicitly cast a LSL_Vector to Vector3 2012-09-08 00:44:27 +01:00
SignpostMarv 874bde366a 4096 is used in various places as the maximum height of a region, refactoring to be a constant 2012-09-08 00:14:39 +01:00
Mic Bowman 641b08aa78 Enables cast from int to float for MOD* functions;
Thanks SignpostMarv!
2012-09-05 09:13:16 -07:00
SignpostMarv 07dbe46ba3 wrapping attachment functions in a region 2012-09-04 00:03:44 +01:00
SignpostMarv ff867b59cf Implementing functing to send messages directly to attachments 2012-09-04 00:03:44 +01:00
SignpostMarv d4b8a13a1d refactoring the grunt work of MessageObject into a private method with a UUID argument 2012-09-04 00:03:44 +01:00
SignpostMarv a858c5daee implementing a function to get the number of attachments worn 2012-09-04 00:03:43 +01:00
Melanie d297eb39e5 Revert "made setting rotation match Second Life"
Second Life seems to have introduced a bug, as we have confirmation that SL
behavior changed recently and changed in contradiction to their stated intention
This appears to be another of the bugs SL is notorious for. Signpost and I have
decided to back this out until SL's intention becomes clear.

This reverts commit f7b88d1c40.
2012-09-03 21:52:12 +01:00
Melanie 29218cdb31 Revert "no need to assign rotation to a variable now"
This reverts commit a3d140b57c.
2012-09-03 21:52:03 +01:00
Melanie 359f9efc76 Revert "formatting"
This reverts commit fb211c64fd.
2012-09-03 21:51:54 +01:00
SignpostMarv fb211c64fd formatting 2012-09-03 13:55:41 +01:00
SignpostMarv a3d140b57c no need to assign rotation to a variable now 2012-09-03 13:55:40 +01:00
SignpostMarv f7b88d1c40 made setting rotation match Second Life 2012-09-03 13:55:40 +01:00
SignpostMarv 3c019bea8c Implementing a vastly simpler means of allowing region modules to access GetLinkParts than mantis 6236 2012-08-31 01:19:17 +01:00
SignpostMarv c76c63725b fixing bug where last element in list is ignored 2012-08-30 00:10:28 +01:00
SignpostMarv 6b277394c0 refactoring as the list funcs either skip invalid values or recall ToDoubleList 2012-08-30 00:10:28 +01:00
Mic Bowman 3d736d575f This partially implements the LSL function to set the response
type for an HTTP request. Since the "official" LSL function limits
the use of the response type, it is implemented as osSetContentType
with a string for the content mime type and a threat level of high.
With this function you should be able to implement rather functional
media-on-a-prim application with much less difficulty.
2012-08-29 14:56:51 -07:00
SignpostMarv 0c3061f973 implementing rule tracking 2012-08-29 02:10:04 +01:00
SignpostMarv 3bf7bd6359 track originating IScriptApi method for SL-like error messages. Will add rule number tracking in next commit. 2012-08-29 02:10:04 +01:00
SignpostMarv 1e18f0f26a copying documentation from http://opensimulator.org/wiki/Threat_level 2012-08-28 00:12:35 +01:00
SignpostMarv 6e86b23012 implementing PRIM_LINK_TARGET on GetPrimParams ala SetPrimParams 2012-08-25 02:30:23 +01:00
SignpostMarv 58714b0aca minor formatting 2012-08-25 02:30:23 +01:00
SignpostMarv 5203665bb2 refactoring to local variable for cleaner code 2012-08-25 02:30:23 +01:00
SignpostMarv 2a2e120470 since we will be making the Get return type the remaining ruleset as with the Set return type, we need to move the original return type to a ref param 2012-08-25 02:30:23 +01:00
SignpostMarv a8044999fb use SceneObjectPart instead of var 2012-08-25 02:30:23 +01:00
SignpostMarv 3d504261b0 renaming to be similar to equivalent Set command 2012-08-25 02:30:23 +01:00
Justin Clark-Casey (justincc) f3a5e3a02b Log initial script startup info notice when xengine actually starts to do this for debugging purposes, rather than before it actually starts to do this. 2012-08-25 00:42:32 +01:00
SignpostMarv 67477290ad stripping superfluous whitespace
Signed-off-by: Melanie <melanie@t-data.com>
2012-08-24 17:44:35 +01:00
SignpostMarv 582a256646 immediately returning the string.Join operation instead of checking if the list has members 2012-08-24 17:44:14 +01:00
SignpostMarv d188272462 refactoring using List.ConvertAll<string> 2012-08-24 17:44:14 +01:00
Justin Clark-Casey (justincc) a08687aef3 Revert "implementing function to allow scripts to self-replicate as if the owner duplicated them, using the same script delay as llRezObject()"
This reverts commit 2ad9d656b3.

Reverted pending consideration of associated issues.
2012-08-24 01:18:35 +01:00
SignpostMarv 2ad9d656b3 implementing function to allow scripts to self-replicate as if the owner duplicated them, using the same script delay as llRezObject() 2012-08-24 00:21:42 +01:00
TBG Renfold a3cbda0d74 Removed land checking as suggested by SignpostMarv.
Now whatever remaining health the avatar has is displayed (float).
This will be 100% (100.000000) if no damage has occurred (as what the viewer should really be seeing anyway).

Returns -1.000000 if the avatar is not found.
2012-08-24 00:13:27 +01:00
TBG Renfold 4f3fabae5b Adds osGetHealth.
Returns the amount of health (in an integer) that an avatar has left in the scene.
If an avatar is not found or safe is enabled on a region, -1 is returned.

Example usage:

default
{
    touch_end(integer _t)
    {
        key agentID = llDetectedKey(0);
        osCauseDamage(agentID, 50);
        llSay(0, llKey2Name(agentID) + " has " + (string)osGetHealth(agentID) + "% health left.");
    }
}
2012-08-24 00:13:14 +01:00
Justin Clark-Casey (justincc) aede42b875 If a script state save fails for some reason on shutdown/region removal, get xengine to spit out some useful information and continue to save other script states 2012-08-23 23:13:53 +01:00
SignpostMarv 4820dfd733 this should be an if-else block in case the non-phys min/max are smaller than the physical min/max 2012-08-22 23:55:01 +01:00
SignpostMarv 481c00f50a refactoring out SetFaceColor 2012-08-20 23:10:25 +01:00
SignpostMarv ede3b9ab07 making use of implicit operators and Util.Clip handling of Vector3 2012-08-20 23:10:25 +01:00
SignpostMarv b863a15a82 single operation for PRIM_COLOR 2012-08-20 23:10:25 +01:00
Justin Clark-Casey (justincc) bcbd450fe4 Add --force flag to "kick user" console command to allow bypassing of recent race condition checks.
This is to allow a second attempt to remove an avatar even if "show connections" shows them as already inactive (i.e. close has already been attempted once).
You should only attempt --force if a normal kick fails.
This is partly for diagnostics as we have seen some connections occasionally remain on lbsa plaza even if they are registered as inactive.
This is not a permanent solution and may not work anyway - the ultimate solution is to stop this problem from happening in the first place.
2012-08-20 20:24:54 +01:00
Melanie 8769e4ee73 Add a reference to OpenMetaverseType.dll to compiled script assemblies. 2012-08-18 19:08:38 +01:00
SignpostMarv d72d599056 integrating redundant code into operator 2012-08-18 18:30:00 +01:00
SignpostMarv ca33619e11 Rot2Quaternion is now redundant 2012-08-18 18:30:00 +01:00
SignpostMarv ffdde05bb7 constructor means not having to manually refer to individual properties 2012-08-18 18:29:59 +01:00
SignpostMarv fb84ff96a9 implicit operators mean one does not need to instantiate new objects manually 2012-08-18 18:29:59 +01:00
SignpostMarv 52d7af05bc adding missing refactor for LSL_Vector 2012-08-18 18:29:59 +01:00
SignpostMarv 2b0c8bc480 Implementing operators & constructors for Quaternion 2012-08-18 18:29:59 +01:00
Melanie 2a70afeca2 Fix the whitespace formatting error introduced by the last patch 2012-08-18 14:00:10 +01:00
SignpostMarv 5d7751da89 refactoring for Vector3 operator & constructor tweaks 2012-08-18 13:21:55 +01:00
Melanie 9d6fe1224a Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-08-18 12:57:49 +01:00
SignpostMarv 28d0aff2e3 adding null return to fix building 2012-08-17 23:23:03 +01:00
SignpostMarv 7068fddd2f fixing bug that get/set the wrong property for prim types other than sphere & box 2012-08-17 23:23:03 +01:00
SignpostMarv 466d684fbe implemented 2012-08-17 23:23:03 +01:00
SignpostMarv 74f5253a36 attempt to handle InvalidCastException in a manner similar to Second Life 2012-08-17 23:08:24 +01:00
Justin Clark-Casey (justincc) 0860a0d856 minor: Make xengine debug message on script load a scripting loading message instead.
This is more useful if compilation fails due to an uncatchable exception since we know what was being compiled.
2012-08-17 22:30:01 +01:00
SignpostMarv e9ea911563 adding a clip method to handle Vector3 objects to enable a minor amount of refactoring 2012-08-17 18:40:49 +01:00
Melanie 9995421df1 Do a proper null check to avoid the overloaded operator == trap 2012-08-16 02:35:03 +01:00
SignpostMarv ef4122213c enables configurable minimum sizes for physical & non-physical prims 2012-08-15 23:35:23 +01:00
Melanie e286a95d76 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-08-15 22:59:31 +01:00
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