OpenSim Mantis Tracker
| Anonymous | Login | Signup for a new account | 2010-09-02 07:51 PDT |
| Main | My View | View Issues | Change Log | Roadmap | Summary | Docs | My Account |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0001856 | [opensim] [REGION] OpenSim Core | feature | always | 2008-07-29 12:40 | 2008-08-16 12:41 | ||||
| Reporter | lmmz | View Status | public | ||||||
| Assigned To | cfk | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | |||||||
| Summary | 0001856: r5698- control() API not implemented properly | ||||||||
| Description |
I have been experimenting with the llTakeControls() and control() API. I have compared the return from the API on LL grid and on OSGrid. The API is not returning values on OSGrid which are consistent with what is returned on LL grid. First, on OSGrid, the control() event fires constantly once TAKE_CONTROLS() is accomplished. This causes horrible lag in reading controls. The control() event should only fire when the desired controls are actually hit. Second, on OSGrid, the control() event returns 512 instead of 256 when controls are actually hit. Third, our LSL script engine complains that the bool values for control(), changed and held, are integers and cannot be cast to bool. That's wrong. Here is a script I used to test the API on OSGrid and LL grid. This script was to go in a pinball machine I am making, to control the flippers. default { state_entry() { llSay(0, "running"); } touch_start(integer x) { llSay(0,"Want to play? I need to read your keyboard."); llSay(0,"Click YES on the permission dialog which will appear at the top right of your screen."); llRequestPermissions(llDetectedKey(0), PERMISSION_TAKE_CONTROLS); } run_time_permissions(integer perms) { integer desired_controls = CONTROL_ROT_LEFT | CONTROL_ROT_RIGHT ; if (perms & PERMISSION_TAKE_CONTROLS) { llTakeControls(desired_controls, TRUE, FALSE); llSay(0,"You can now use your keyboard's LEFT ARROW and RIGHT ARROW keys as flipper buttons."); llSay(0,"You can click RELEASE CONTROLS to get keyboard control back."); } } control(key id, integer held, integer change) { llSay(0,"control: held="+(string)held+"and CONTROL_ROT_LEFT="+(string)CONTROL_ROT_LEFT+"and change="+(string)change); if ( held == 512 & change == 512 & CONTROL_ROT_LEFT == 256 ) { llSay(0,"left flipper held."); } else if ( held == 0 & change == 512 & CONTROL_ROT_LEFT == 256) { llSay(0,"left flipper released."); } } } |
||||||||
| Additional Information | |||||||||
| Tags | No tags attached. | ||||||||
| Git Revision | |||||||||
| SVN Revision | 5698 | ||||||||
| Run Mode | Grid (Multiple Regions per Sim) | ||||||||
| Physics Engine | ODE | ||||||||
| Environment | Mono / Linux32 | ||||||||
| Mono Version | None | ||||||||
| Attached Files |
|
||||||||
|
|
|||||||||
| Mantis 1.1.1[^] Copyright © 2000 - 2008 Mantis Group |