aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Change default script stop method to co-op instead of abort.Justin Clark-Casey (justincc)2014-07-161-1/+5
| | | | | | | co-op should be more stable as it doesn't abort threads, which can trigger virtual machine instability This change will be invisible to users as script DLLs are recompiled automatically where necessary, though the change won't take affect until the next simulator restart. This change has no effect on existing script state. If you want to continue using abort, set ScriptStopStrategy = abort in the [XEngine] section of OpenSim.ini
* 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: Move debug xengine script console command to Debug help section where ↵Justin Clark-Casey (justincc)2014-07-111-1/+1
| | | | other debug commands live.
* minor: further cleanup of old vb and yield prolog script engine references ↵Justin Clark-Casey (justincc)2014-07-113-20/+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-116-67/+111
| | | | | | | 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-174-4/+4
|
* Fixed a few things pertaining to interfacing with the estate service. ↵Diva Canto2014-06-011-1/+1
| | | | | | Specifically, StoreEstateSettings was not being used anywhere; instead EstatSetting.Save was being called, but that method is a trigger to the DB-layer code directly, which, besides being wrong, was making it impossible to replace the service with a remote connector. Also added more packing/unpacking code.
* In compiler tests, remove the ResolveEventHandlers after test exitJustin Clark-Casey (justincc)2014-05-271-3/+6
|
* Make CompilerTest add same AssemblyResolver as XEngine to see if this solves ↵Justin Clark-Casey (justincc)2014-05-271-1/+7
| | | | the issue with different AppDomain BaseDirectory in local and Jenkins test runs
* Temporarily print regression TestCastAndConcatString() script compile errors ↵Justin Clark-Casey (justincc)2014-05-271-4/+5
| | | | | | out to console to get a handle on what's going wrong. Does not fail for me locally and I failed to notice this test was failing on Jenkins.
* Fix issues where reported LSL compiler error line numbers do not match the ↵Justin Clark-Casey (justincc)2014-05-242-16/+16
| | | | | | | script. This is probably due to changes in the layout of the generated script preamble (using statements etc, ) in c8afc852 (Jan 17 2013). Re-enabled existing regression test that exercises at least one case of this.
* Get regression test TestUseUndeclaredVariable() functional again, though not ↵Justin Clark-Casey (justincc)2014-05-231-8/+19
| | | | | | yet enabled. This reveals the position map problems and will make the fix (and subsequent continual checking) easier.
* Reactivate regression test TestCastAndConcatString() in CompilerTests.Justin Clark-Casey (justincc)2014-05-232-10/+18
|
* If a script calls llSetCameraAtOffset() or llSetCameraEyeOffset() on a child ↵Justin Clark-Casey (justincc)2014-05-221-0/+6
| | | | | | prim and the root prim has no corresponding value set, then also set the root prim. This matches behaviour just tested on the Linden Lab grid.
* Change llUnSit to be able to unsit any avatar that is currently sat on the ↵Vegaslon2014-05-061-1/+2
| | | | object, not just avatars sitting on the sittarget in the object containing the script. or when the object is owned by the parcel, land group or estate owner.
* Mantis 7146 The lsl function llGetMassMKS is not implementedTalun2014-05-063-0/+13
| | | | | This patch implements llGetMassMKS as it is described in the wiki http://wiki.secondlife.com/wiki/LlGetMassMKS
* Show more meaningful error messages when failed to move an item from a prim ↵Oren Hurvitz2014-05-062-5/+10
| | | | | | to a user's inventory. Also, actually show the error to the user in more cases. (Previously, sometimes the operation failed without telling the user anything.)
* Added range-checking for the parameters to PRIM_POINT_LIGHT (used in ↵Oren Hurvitz2014-05-061-3/+3
| | | | llSetLinkPrimitiveParamsFast() )
* Mantis 7144 missing ATTACH_AVATAR_CENTER constantTalun2014-05-011-0/+2
| | | | This patch adds ATTACH_AVATAR_CENTER and ATTACH_NECK
* Change XEngine to call StateChange rather than RemoveScript on state changesMelanie2014-04-301-1/+1
|
* Add the "StateChange" function to the async comand manager to differentiateMelanie2014-04-301-1/+23
| | | | between state changes and script exit/reset.
* Eliminated many warningsOren Hurvitz2014-04-232-23/+2
|
* minor: use constants instead of magic numbers in llRequestAgentData() where ↵Justin Clark-Casey (justincc)2014-04-111-6/+6
| | | | possible
* Actually add the llRequestAgentData() test class for commit 530c86Justin Clark-Casey (justincc)2014-04-111-0/+157
|
* Fix the presence info caching used in llRequestAgentData(), which was ↵Justin Clark-Casey (justincc)2014-04-111-58/+85
| | | | | | | | completely inoperative. This means the presence info may be out of date by up to 20 seconds, but this avoids scripts potentially triggering constants requests to user accout and presence info services. Relates to http://opensimulator.org/mantis/view.php?id=7088 though I fixed in a different way. Adds regression test for this case.
* refactor: Use m_sittingAvatars to maintain the list of sitting avatars ↵Justin Clark-Casey (justincc)2014-04-031-11/+8
| | | | | | instead of two independent structures that do exactly the same thing m_sittingAvatars code also already properly handles locking to avoid races.
* Add check to prevent the return of a wrong value when key is NULL_KEYBlueWall2014-03-311-1/+4
|
* Also take YP/commented out JS references from script engine CodeTools.Justin Clark-Casey (justincc)2014-03-262-157/+0
| | | | Fixes build break from d3387d591a2bd496c8315f17b2310d6a6f40a7c3
* Remove unmaintained and unused YieldProlog scripting languageJustin Clark-Casey (justincc)2014-03-2616-15874/+0
| | | | | | | This hasn't been mainntained since 2008 and has not been kept up with the rest of the language infrastructure. Hence, it almost certainly doesn't work and has never been used, afaik If this is wrong, please say on the opensim-users/dev mailing list. Removing to reduce maintenance burden (since it still needs to be made to compile).
* Better error messagesOren Hurvitz2014-03-241-6/+5
| | | | This resolves http://opensimulator.org/mantis/view.php?id=6936
* Mantis 6922: No particles are generated if their size exceeds the maximum ↵Talun2014-03-211-4/+10
| | | | | | allowed size. This patch ensures that no particle scal value can exceed 4.0
* Mantis 6974 PERMISSION_TRACK_CAMERA should be implicit on attach.Talun2014-03-201-0/+1
| | | | | http://wiki.secondlife.com/wiki/Run_time_permissions This change makes PERMISSION_TRACK_CAMERA implicit on attach
* Implement osForceBreakAllLinks().Justin Clark-Casey (justincc)2014-03-134-0/+25
| | | | Identical to llBreakAllLinks() except that it doesn't require the script to have link permissions.
* Only allow llBreakAllLinks() to work if script has received ↵Justin Clark-Casey (justincc)2014-03-122-0/+50
| | | | | | | PERMISSION_CHANGE_LINKS As per http://wiki.secondlife.com/wiki/LlBreakAllLinks Same as existing llCreateLink() and llBreakLink()