aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Adding dynamic ossl permission control"BlueWall2015-02-273-58/+0
| | | | | This reverts commit a3681f3052fb5e98e31e7051329a5b748a8bdd8d until further testing. Jenkins now fails ossl tests.
* Adding dynamic ossl permission controlBlueWall2015-02-273-0/+58
| | | | | | | | | | | Add permission by identifying uuid (owner/creator/group) and function. Revoke permission in the same manner. Permission adjustments immediately effect running scripts ability to call os functions. osGrantScriptPermissions(UUID key,string function) Threat Level Severe osRevokeScriptPermissions(UUID key,string function) Threat Level Severe work sponsored by: Rage
* Reduce coupling in regression test task inventory creation methods to make ↵Justin Clark-Casey (justincc)2015-02-256-19/+19
| | | | them usable in tests with no scene present
* llLookAt(): use non-physical rotation if host prim is a physical attachmentdahlia2015-02-241-1/+1
|
* correct some minor comment misspellings in last commitdahlia2015-02-021-2/+2
|
* Compute rotation for llLookAt() with local positive X axis pointing downdahlia2015-02-021-14/+11
|
* Avoid a possible race condition by serializing plugin data outside the ↵Justin Clark-Casey (justincc)2015-01-291-2/+9
| | | | | | | | EventQueue lock in ScriptInstance.SaveState() This takes the AsyncCommandHandler.staticLock. However, AsyncCommandHandler.DoOneCmdHandlerPass() already holds staticLock and may attempt to take the EventQueue lock via ScriptInstance.PostEvent() in XEngine.CheckListeners() This is a regression from faaf47a (Fri Jan 16 2015) but not simply reverting that commit since it will reintroduce a race between script removal, backup and event queue manipulating code.
* On a multi-region simulator when AppDomain = true, make sure the DLL from ↵Justin Clark-Casey (justincc)2015-01-263-81/+39
| | | | | | the appropriate script engines subdir is loaded rather than always that of the first engine to load the DLL. This resolves a DLL load failure on my Linux box when an attachment script was present on another region before the avatar arrived.
* When deleting an assembly before re-compile, make sure its attributes allow ↵Justin Clark-Casey (justincc)2015-01-231-1/+5
| | | | | | | deletion. This is to see if this helps with the problem in http://opensimulator.org/mantis/view.php?id=7278 where some DLLs are not allowing this. Since OpenSim created the file it should always be allowed to delete it.
* Fix regression where the stored state of every second script in an object ↵Justin Clark-Casey (justincc)2015-01-231-0/+3
| | | | | | | rezzed from inventory (e.g. attachments) was no longer loaded. Likely a regression since f132f642 (2014-08-28) Relates to http://opensimulator.org/mantis/view.php?id=7278
* Prevent a race condition between the script engine backup thread and script ↵Justin Clark-Casey (justincc)2015-01-161-30/+40
| | | | | | removal by locking on the script's EventQueue and only proceeding if it's flagged as still running. Relates to http://opensimulator.org/mantis/view.php?id=7407
* For scripts in attachments, don't save .state files apart from the initial ↵Justin Clark-Casey (justincc)2015-01-161-5/+22
| | | | | | | | one as these are ignored since .state is saved in the attachment's asset. This eliminates pointless work and exceptions when an appdomain is unloaded whilst an attachment script state is persisted. Adds test for this case. Relates to http://opensimulator.org/mantis/view.php?id=7407
* minor: Add event name to existing debug output when a script event fails ↵Justin Clark-Casey (justincc)2015-01-081-1/+2
| | | | with an exception. To aid debugging.
* Fix a regression where objects crossing regions in the same simulator (on ↵Justin Clark-Casey (justincc)2014-12-101-30/+36
| | | | | | | | | | their own or as attachments) with AppDomainLoading = false would create the new state in the source region area rather than the dest. This was beause the code was finding the script DLL compiled for the source region as everything is in the same appdomain and using this as the location for the destination script state, etc. This resolves the regression by passing the proper destination separately from the DLL retrieved. Probably a regression since commit d7b92604 (11 July 2014). Added regression test for this case. At least partly addresses http://opensimulator.org/mantis/view.php?id=7278
* Always close script linemap file after reading and always dispose of other ↵Justin Clark-Casey (justincc)2014-12-032-29/+29
| | | | streams in the script engine even if exceptions are thrown.
* refactor: Move methods to start a monitored thread, start work in its own ↵Justin Clark-Casey (justincc)2014-11-251-1/+1
| | | | | | | | thread and run work in the jobengine from Watchdog to a WorkManager class. This is to achieve a clean separation of concerns - the watchdog is an inappropriate place for work management. Also adds a WorkManager.RunInThreadPool() class which feeds through to Util.FireAndForget. Also switches around the name and obj arguments to the new RunInThread() and RunJob() methods so that the callback obj comes after the callback as seen in the SDK and elsewhere
* Fix compile error from previous 1d56029848e96016b5809f596619e32d0ebcc995Justin Clark-Casey (justincc)2014-11-251-1/+1
|
* Fix issue where llRemoteLoadScriptPin() would treat 0 (the default) as a ↵Justin Clark-Casey (justincc)2014-11-251-0/+47
| | | | | | valid set pin in a destination prim rather than the unset no pin state Adds regression test for this case.
* Label all threadpool calls being made in core OpenSimulator. This is to add ↵Justin Clark-Casey (justincc)2014-11-252-10/+14
| | | | | | problem diagnosis. "show threadpool calls" now also returns named (labelled), anonymous (unlabelled) and total call stats.
* Add some more llGiveInventory() regression testsJustin Clark-Casey (justincc)2014-11-251-48/+1
|
* refactor: consistently put all test classes in the OpenSim.Tests.Common ↵Justin Clark-Casey (justincc)2014-11-2512-13/+0
| | | | | | package rather than some in OpenSim.Tests.Common.Mock the separate mock package was not useful and was just another using line to always add
* LSL key should be implicitly cast to a boolean valueCinder2014-11-201-0/+10
| | | | Signed-off-by: James Hughes <jamesh@ascent.bluewallgroup.com>
* Fix issue where llRemoteLoadScriptPin() would treat 0 (the default) as a ↵Justin Clark-Casey2014-11-111-0/+48
| | | | | | valid set pin in a destination prim rather than the unset no pin state Adds regression test for this case.
* Add some more llGiveInventory() regression testsJustin Clark-Casey (justincc)2014-10-161-0/+71
|
* Change name of just added OSSL osForceSit() to osForceOtherSit()Justin Clark-Casey (justincc)2014-10-113-11/+12
| | | | | This is somewhat more in keeping with something like osForceAttachToOtherAvatarFromInventory() and potentially allows a separate osForceSit() command with High threat rather than VeryHigh that only sits the owner and can be enabled without enabling sit of other avatars.
* minor: spacing cleanup from previous commit 79a4d1eaJustin Clark-Casey (justincc)2014-10-111-3/+3
|
* Implements osForceSit(string avatar) & overload osForceSit(string avatar, ↵Vegaslon2014-10-113-0/+64
| | | | | | | | | | | | | string target) Allows a script IN the target prim to force an avatar to sit on it using normal methods as if called by the client. Overload method of osForceSit() to allow a script NOT in the target prim to force an avatar to sit on the target prim using normal methods as if called by the client. This patch is based on previous work from http://opensimulator.org/mantis/view.php?id=4492 and also includes the suggestions from justincc including change of threat level Thank you Christos Lightling.
* Change thread of osForceAttachToOvtherAvatarFromInventory to VeryHigh from ↵Justin Clark-Casey (justincc)2014-10-081-1/+1
| | | | | | Severe It fits much better in this category.
* Add LSL transaction_result event.Justin Clark-Casey (justincc)2014-10-043-10406/+11381
| | | | | | | This is cinderblocks' transaction_result.diff from http://opensimulator.org/mantis/view.php?id=7329 but I have used lsl.parser.cs and lsl.lexer.cs files generated directly from opensim-libs rather than those supplied in the patch. I also added scriptEvents.transaction_reuslt. The required parser/lexer generation file changes were made in commit d564f28 in the opensim-libs repo. Thanks!
* Changes to be committed: modified: ↵Edward2014-09-171-0/+6
| | | | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs modified: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs This solves mantis bug# 5005: llRegionSay script does not trigger ChatFromWorld event. This was solved by adding World.SimChat() command to the llRegionSay() function (per suggestion of DrCuriosity). Additionally this fixes llRegionSayTo() which was also not functioning by adding a World.SimChat() command and adding a new SimChatToAgent() overrided function to Scene.PacketHandlers.cs This is the second patch revision. Corrections made to the position of World.SimChat() and removal of tabs per suggestion by justincc.
* Fix recent regression from 473c5594 where camera started to judder on moving ↵Justin Clark-Casey (justincc)2014-09-021-3/+3
| | | | | | | vehicles. Other parts of OpenSimulator are relying on SP.Velocity == 0 for vehicles. So add and use SP.GetWorldVelocity() instead when we need vehicle velocity, along the same lines as existing SP.GetWorldRotation()
* As per the LL grid, for attachments make llGetObjectDetails() ↵Justin Clark-Casey (justincc)2014-08-301-1/+15
| | | | | | OBJECT_VELOCITY return the avatar's velocity and not always Vector3.Zero. This completes http://opensimulator.org/mantis/view.php?id=7177
* minor: fix wrong indentation in previous commit 0cc3cdJustin Clark-Casey (justincc)2014-08-301-1/+1
|
* As per the LL grid, for attachments make llGetObjectDetails() OBJECT_ROT ↵Justin Clark-Casey (justincc)2014-08-301-4/+13
| | | | | | | return the avatar's rotation. This is already the behaviour of OBJECT_POS. Partially satisfies http://opensimulator.org/mantis/view.php?id=7177
* Implement STATUS_BLOCK_GRAB_OBJECT in llSetStatus()/llGetStatus() and ↵Justin Clark-Casey (justincc)2014-08-292-10/+9
| | | | | | | | | correct effect of STATUS_BLOCK_GRAB As per http://wiki.secondlife.com/wiki/LlSetStatus Setting STATUS_BLOCK_GRAB_OBJECT prevents or allows move of a physical linkset by grab on any prim. Setting STATUS_BLOCK_GRAB prevents or allows move of a physical linkset by grab on a particular prim. Previously, setting STATUS_BLOCK_GRAB would prevent drag via all prims of the linkset.
* Prevent exception if inventory item in llGiveInventory() call doesn't exist.Kevin Cozens2014-08-181-0/+1
|
* Added RestrictEmail to make llEmail only send to avatars email address if true.Kevin Cozens2014-08-141-0/+34
|
* Eliminated some warningsOren Hurvitz2014-07-211-1/+1
|
* Use thread-safe version of .NET Random as the SDK class is not thread-safe.Justin Clark-Casey (justincc)2014-07-141-4/+2
| | | | | | | | As per http://msdn.microsoft.com/en-us/library/system.random%28v=vs.100%29.aspx, the .NET Random class is not thread-safe. If called by multiple threads at once, methods may return 0. Except for llRand(), other OpenSimulator code did not lock before calling a shared Random instance. This commit adds a ThreadSafeRandom class that extends Random but does internal locking so that it is thread-safe. This change is invisible to existing callers and the explicit locking in the llFrand() implementation is now redundant.
* minor: further cleanup of old vb and yield prolog script engine references ↵Justin Clark-Casey (justincc)2014-07-112-18/+2
| | | | that were removed some time ago
* If [XEngine] ScriptStopStrategy is changed between abort and co-op, for the ↵Justin Clark-Casey (justincc)2014-07-113-56/+44
| | | | | | | existing session use the previous strategy for that script rather than not starting the script at all. We have to do this since we can't unload existing DLLs if they're all in the same AppDomain. But we can still update the underlying DLL which will be used in the next simulator session.
* refactor: use existing Compiler.CreateScriptsDirectory() (renamed to ↵Justin Clark-Casey (justincc)2014-07-101-26/+4
| | | | | | | CheckOrCreateScriptsDirectory()) when checking that scripts directory exists on compile. Code was identical apart from error logging, but if there are failures creating these directories then you'll be seeing lots of errors anyway, and these will be more informative
* add LSL constant PRIM_ALPHA_MODEdahlia2014-06-271-0/+1
|
* add LSL constants PRIM_SPECULAR and PRIM_NORMALdahlia2014-06-231-0/+2
|
* Improved line map heuristics.Aleric Inglewood2014-06-191-16/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the C# column can't be found in the positionMap (but the line can), use the map immediately after it while correcting for the offset, unless that results in an LSL position before the previous LSL position in the positionMap. The idea behind this heuristic is that in most, if not all cases C# consumes more characters than LSL (for example LSL_Types.LSLInteger instead of just 'integer'). Thus if the distance between the columns of two markers differ in the C# and LSL file, the distance in the C# file will be larger. Moreover, we can assume that every time this happens we will have a marker at the beginning of the longer 'keyword', because those keywords were generated by us in the first place. For example: C#: LSL_Types.LSLInteger f2(LSL_Types.LSLString s) ^ ^ 1 2 will always have markers at the beginning of the long keywords 'LSL_Types.LSLInteger' and 'LSL_Types.LSLString'. If an error is generated in between (for example at the beginning of the function name 'f2') then the correct position is found by using an offset relative to 2 rather than 1. Note that a case where this isn't working correctly is when the user adds extra spaces. For example: LSL: integer f2( string s) would still use the start of 'string' as reference and then go backwards 3 characters only because the corresponding C# still looks like C#: LSL_Types.LSLInteger f2(LSL_Types.LSLString s) ^ ^ only 3 chars difference and the reported error at 'f2' would be here: LSL: integer f2( string s) ^ This can only be fixed by generating a mapping for 'f2' itself, or generating a mapping whenever the amount of spaces is changed.
* Fix looking up line number and colum when there is no exact match.Aleric Inglewood2014-06-191-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a compile error reports a colum/error that is not an exact match in the positionMap dictionary, the last position in the map with a line number and position before the reported error should be returned. The old code had the following problems: 1) It returns l,c - which are line and column of the C# file, not LSL. 2) It doesn't set l to 'line' when the map has an entry with 'line'. 3) It sorts the map without taking columns into account, which may result in a random order of the columns. With my mono implementation the columns were reversed in order. For example, if the map contains the following lines: 99,5,49,10 100,30,50,10 100,40,1,0 101,5,51,10 and a translation of 100,35 was requested, then the old code would compare '100' with the keys in the first column - setting l to that key while it is smaller. Hence, l is set to 99. Then it finds the key 100 and doesn't update l. Because of the reversed sort order, it first compares the column 35 with 40, finding that it is smaller and therefore it stops; returning 99,1 instead of finding the correct 100,30 entry and returning 50,10. This patch causes 50,10 to be returned. The remaining problems after this patch are: 1) The sorting might not be necessary at all. 2) The is code duplication (I fixed both instances, but really there should be no code duplication imho).
* refactor: Simplify compilation result tests by factoring out common code.Justin Clark-Casey (justincc)2014-06-181-71/+45
|
* In compiler regression tests, setup and teardown structures for each test to ↵Justin Clark-Casey (justincc)2014-06-181-1/+5
| | | | avoid any possibility of inter-test inter-ference
* Fix issue with LSL jumps screwing up the C# compiler error -> LSL code ↵Justin Clark-Casey (justincc)2014-06-182-8/+55
| | | | | | | | position map and leading to invalid error line numbers/columns This is because jump statement generation was mistakenly inserting its own line without updating the csharp positions in CSCodeGenerator. This is Aleric Inglewood's patch in http://opensimulator.org/mantis/view.php?id=7195 but applied to opensim itself rather than the defunct code generation in opensim-libs. Thanks! This patch also adds a regression test for this case from myself.
* Change assembly versions to 0.8.1Justin Clark-Casey (justincc)2014-06-173-3/+3
|