diff options
-rw-r--r-- | indra/newview/lldrawable.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 4 | ||||
-rw-r--r-- | scripts/testing/lsl/axon_test_region_driver.lsl | 8 | ||||
-rw-r--r-- | scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl | 39 |
4 files changed, 29 insertions, 28 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 61ebf947dd..8001486b53 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -50,6 +50,7 @@ #include "llviewerobjectlist.h" #include "llviewerwindow.h" #include "llvocache.h" +#include "llcontrolavatar.h" const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f; const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f; @@ -697,6 +698,11 @@ F32 LLDrawable::updateXform(BOOL undamped) mXform.setScale(LLVector3(1,1,1)); //no scale in drawable transforms (IT'S A RULE!) mXform.updateMatrix(); + if (mVObjp && mVObjp->isRootEdit() && mVObjp->getControlAvatar()) + { + mVObjp->getControlAvatar()->matchVolumeTransform(); + } + if (mSpatialBridge) { gPipeline.markMoved(mSpatialBridge, FALSE); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index cb9f9e0455..e2fbac023a 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4062,10 +4062,6 @@ void LLViewerObject::setPosition(const LLVector3 &pos, BOOL damped) // position caches need to be up to date on root objects updatePositionCaches(); } - if (getControlAvatar() && isRootEdit()) - { - getControlAvatar()->matchVolumeTransform(); - } } void LLViewerObject::setPositionGlobal(const LLVector3d &pos_global, BOOL damped) diff --git a/scripts/testing/lsl/axon_test_region_driver.lsl b/scripts/testing/lsl/axon_test_region_driver.lsl index dfcbb9871a..dcf146a9cf 100644 --- a/scripts/testing/lsl/axon_test_region_driver.lsl +++ b/scripts/testing/lsl/axon_test_region_driver.lsl @@ -1,4 +1,4 @@ -list buttons = ["anim start", "anim stop", " ", "verbose on", "verbose off", " "]; +list buttons = ["anim start", "anim stop", "step", "verbose on", "verbose off", " "]; string dialogInfo = "\nPlease make a choice."; key ToucherID; @@ -20,7 +20,7 @@ default llListenRemove(listenHandle); listenHandle = llListen(dialogChannel, "", ToucherID, ""); llDialog(ToucherID, dialogInfo, buttons, dialogChannel); - llSetTimerEvent(60.0); // Here we set a time limit for responses + //llSetTimerEvent(60.0); // Here we set a time limit for responses } listen(integer channel, string name, key id, string message) @@ -35,7 +35,7 @@ default // stop timer since the menu was clicked llSetTimerEvent(0); - llOwnerSay("Sending message " + message + " on channel " + (string)commandChannel); + //llOwnerSay("Sending message " + message + " on channel " + (string)commandChannel); llRegionSay(commandChannel, message); } @@ -45,7 +45,7 @@ default llSetTimerEvent(0); llListenRemove(listenHandle); - llWhisper(0, "Sorry. You snooze; you lose."); + //llWhisper(0, "Sorry. You snooze; you lose."); } } diff --git a/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl b/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl index 5303b6f4f5..fa12ab0588 100644 --- a/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl +++ b/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl @@ -1,6 +1,6 @@ integer listenHandle; integer verbose; -integer num_steps = 50; +integer num_steps = 12; float circle_time = 5.0; integer circle_step; vector circle_pos; @@ -14,12 +14,21 @@ start_circle(vector center, float radius) circle_radius = radius; circle_step = 0; llSetTimerEvent(circle_time/num_steps); + llTargetOmega(<0.0, 0.0, 1.0>, TWO_PI/circle_time, 1.0); } stop_circle() { llSetTimerEvent(0); - llSetRegionPos(circle_center); + llTargetOmega(<0.0, 0.0, 1.0>, TWO_PI/circle_time, 0.0); + integer i; + for (i=0; i<10; i++) + { + vector new_pos = circle_center; + new_pos.x += llFrand(0.01); + llSetRegionPos(new_pos); + llSleep(0.1); + } } next_circle() @@ -32,34 +41,19 @@ next_circle() circle_step = (circle_step+1)%num_steps; } -circle_path(vector center, float radius) -{ - integer i; - integer num_steps = 50; - float circle_time = 5.0; // seconds - for (i=0; i<num_steps; ++i) - { - float rad = (i * TWO_PI)/num_steps; - float x = center.x + llCos(rad)*radius; - float y = center.y + llSin(rad)*radius; - float z = center.z; - llSetRegionPos(<x,y,z>); - llSleep(circle_time/num_steps); - } -} - default { state_entry() { - llSay(0, "Hello, Avatar!"); + //llSay(0, "Hello, Avatar!"); listenHandle = llListen(-2001,"","",""); verbose = 0; + circle_center = llGetPos(); } listen(integer channel, string name, key id, string message) { - llOwnerSay("got message " + name + " " + (string) id + " " + message); + //llOwnerSay("got message " + name + " " + (string) id + " " + message); list words = llParseString2List(message,[" "],[]); string command = llList2String(words,0); string option = llList2String(words,1); @@ -85,6 +79,11 @@ default verbose = 0; } } + if (command=="step") + { + llSetTimerEvent(0); + next_circle(); + } } timer() |