aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 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()
* Implement osForceCreateLink() and osForceBreakLink()Justin Clark-Casey (justincc)2014-03-124-8/+62
| | | | | | | These are identical to llCreateLink() and llBreakLink() except that they don't require script permissions. However, osForceCreateLink() still requires that linked and linkee still have the same owner. There's also an AutomaticLinkPermission setting in [XEngine] that could be set to true to prevent the LSL function checks. But this doesn't allow the finer control over which users/scripts, etc. can do this that the OSSL functions provide.
* Add Varregion support to osGetRegionSize OSSL functionDev Random2014-03-071-1/+3
| | | | Signed-off-by: Michael Cerquoni <nebadon2025@gmail.com>
* If an avatar is sitting, send out position updates to clients for any ↵Justin Clark-Casey (justincc)2014-03-051-1/+31
| | | | | | | | change, not just those outside the usual tolerances. This is to allow small adjustments of less than 0.05m in functions such as llSetPrimitiveLinkParams() to work This is another fix for http://opensimulator.org/mantis/view.php?id=7044 Extends regression test for this case.
* When positioning agent with PRIM_ROTATION in llSetLinkPrimitiveParams(), set ↵Justin Clark-Casey (justincc)2014-03-032-12/+38
| | | | | | | the global rotation rather than the local rotation Functionally the same as the patch in http://opensimulator.org/mantis/view.php?id=7044, thanks Aleric. This commit also extends the regression test
* Stop LSL_Api.GetLinkEntities() from creating an unused list on every ↵Justin Clark-Casey (justincc)2014-02-271-9/+6
| | | | parameter except LINK_THIS. Simplify code.
* minor: remove unused variable from recent commit 0e23374Justin Clark-Casey (justincc)2014-02-271-2/+0
|
* refactor: Make osGetPrimtiveParams() and soSetPrimitiveParams() use common ↵Justin Clark-Casey (justincc)2014-02-271-33/+12
| | | | get/set params code in LSL_Api rather than an old copy&pasted section.
* Add some regression tests for previous commit 0e23374Justin Clark-Casey (justincc)2014-02-261-0/+115
|
* Implement PRIM_ROTATION, PRIM_ROT_LOCAL, PRIM_POSITION and PRIM_POS_LOCAL ↵Justin Clark-Casey (justincc)2014-02-261-17/+128
| | | | | | | when manipulating avatars via llSetLinkPrimitiveParams() Combination of core parts of Freaky's patch at https://github.com/ft-/opensim-patches/blob/master/opensim-llsetlinkprimitive-agent-fix.patch plus further adjustments from myself. Resolves Mantises 6121, 6421, 6573, 6657
* Merge branch 'justincc-master'Justin Clark-Casey (justincc)2014-01-311-98/+125
|\
| * Made error messages more consistentDavid Rowe2014-01-311-15/+15
| |