Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
03-17-2007 00:01
With a recent update, warpPos, the long-standing and wideley used "teleporter trick" was broken. WHile it did indeed still function, it didn't function as desired. The method before WarpPos, was to loop a llSetPos command inside a while loop. This function seeks to integrate WarpPos with a "fallback" behaviour.. allowing it to still GET YOU WHERE YOU WANT TO GO even if warpPos is broken. An update was issued, to repair warpPos, but was retracted a very short time later.. making this "safety net" more critical than ever. warpPos( vector destpos ) { integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1; if (jumps > 100 ) { jumps = 100; } list rules = [ PRIM_POSITION, destpos ]; integer count = 1; while (( count = count << 1 ) < jumps) { rules = (rules=[]) + rules + rules; } llSetPrimitiveParams( rules + llList2List( rules, (count - jumps) << 1, count) ); if (llVecDist(destpos, llGetPos()) > 0.01) { jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1; count = 0; while ( count < jumps) { llSetPos(destpos); count++; } } }
_____________________
 ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura
|
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
|
Original Thread
03-21-2007 04:20
_____________________
i've got nothing. 
|