Anonymous | Login | Signup for a new account | 2021-01-23 21:03 PST | ![]() |
Main | My View | View Issues | Change Log | Roadmap | Summary | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0008353 | opensim | [REGION] Script Functions | public | 2018-08-09 20:58 | 2018-08-10 18:17 | |||||
Reporter | realtime | |||||||||
Assigned To | ||||||||||
Priority | normal | Severity | minor | Reproducibility | always | |||||
Status | new | Resolution | open | |||||||
Platform | OpenSim server | Operating System | FreeBSD | Operating System Version | 11.2 | |||||
Product Version | 0.9.0.1 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0008353: Incorrect handling of radiusoffset in setprimitiveshapeparams | |||||||||
Description | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs around line 8537, this block of code is incorrect: // limits on radiusoffset depend on revolutions and hole size (how?) seems like the maximum range is 0 to 1 if (radiusoffset < 0f) { radiusoffset = 0f; } if (radiusoffset > 1f) { radiusoffset = 1f; } tempFloat = 100.0f * radiusoffset; shapeBlock.PathRadiusOffset = (sbyte)tempFloat; Actual behaviour should be to limit the radiusoffset to the range 0 to taper.y. The radiusoffset must be zero or negative if taper.y is negative, and zero or positive if taper.y is positive. | |||||||||
Steps To Reproduce | 1. create a prim 2. add the following script: default { state_entry() { list p = [9, 4, 0, <0,1,0>, 0.0, <0,0,0>, <.5,.5,0>, <0,0,0>, <0,1,0>, <-1,-1,0>, 1.0, -0.7, 0.0]; llSetLinkPrimitiveParamsFast(0, p); } } 3. allow the script to run 4. edit the prim and look at the object parameters - Radius is zero 5. manually adjusting the radius will show it can only be set to negative values 6. manually changing taper y to be closer to zero than radius will show that radius is automatically updated to be equal to taper y to keep it in range | |||||||||
Additional Information | suggested replacement code: if (taper_a.y < 0f) { if (radiusoffset < taper_a.y) { radiusoffset = taper_a.y; } if (radiusoffset > 0f) { radiusoffset = 0f; } } else { if (radiusoffset > taper_a.y) { radiusoffset = taper_a.y; } if (radiusoffset < 0f) { radiusoffset = 0f; } } | |||||||||
Tags | llSetPrimitiveParams, scripting | |||||||||
Git Revision or version number | 0.9.0.1 binary release | |||||||||
Run Mode | Grid (Multiple Regions per Sim) | |||||||||
Physics Engine | ubODE | |||||||||
Script Engine | ||||||||||
Environment | Mono / Linux64 | |||||||||
Mono Version | 5.x | |||||||||
Viewer | Firestorm 5.1.7 | |||||||||
Attached Files | ||||||||||
![]() |
|
(0032852) realtime (reporter) 2018-08-10 18:17 |
On further experimentation, I have encountered a prim where the taper.y is positive, but the radius offset is negative, so my suggested code fix is not correct. Might be easiest to just let the parameter range from -1.0 to 1.0 and it seems it will get clamped to the correct range somewhere else in the simulator code. |
![]() |
|||
Date Modified | Username | Field | Change |
2018-08-09 20:58 | realtime | New Issue | |
2018-08-09 21:01 | realtime | Tag Attached: llSetPrimitiveParams | |
2018-08-09 21:01 | realtime | Tag Attached: scripting | |
2018-08-10 18:17 | realtime | Note Added: 0032852 |
Copyright © 2000 - 2012 MantisBT Group |