[sldev] Teleportation woes
Harold Brown
labrat.hb at gmail.com
Sun Sep 16 10:39:24 PDT 2007
I'd look at the startup / login process.
There is already code in place to handle teleporting to a specific location
when entering the grid.
in llstartup.cpp
if ( LLURLSimString::sInstance.mSimString.length() )
{
// record the location to start at next time
gSavedSettings.setString( "NextLoginLocation", LLURLSimString::
sInstance.mSimString );
};
On 9/16/07, Soft Linden <soft at lindenlab.com> wrote:
>
> On 9/14/07, Michael Miller <1337mail at gmail.com> wrote:
> > I'm trying to get my client to automatically teleport to a location at
> > the start of the game. The jist of the code is as such:
> >
> > if(gStartupState == STATE_STARTED)
> > gAgent.teleportViaLocation(LLVector3d(98,143,120));
> >
> > This(the teleportViaLocation method) generates the following message:
> >
> > 2007-09-15T01:00:09Z WARNING: teleportViaLocation: Using deprecated
> > teleportlocationrequest.
> > 2007-09-15T01:00:09Z WARNING: createXml: Alert: [CouldNotTeleportReason]
> > 2007-09-15T01:00:09Z WARNING: createDialog: Alert: Could not teleport.
> > Problem encountered processing your teleport request. You may
> > need to log back in before you can teleport. If
> you continue
> > to get this message, please check the Tech
> Support FAQ at:
> > www.secondlife.com/support
> >
> > I have even tried waiting 60 seconds(while the game is fully running
> > for some time) before executing this request. Is this due to the
> > teleportViaLocation method? Am I calling it correctly? Should I be
> > calling something else?
>
> With this kind of question, I usually start by asking where the code
> does something similar to what I want. Teleporting via the map dialog
> would seem to do it exactly, so I'd begin by looking at what happens
> when you click "teleport" there. The easiest way to find that code is
> to find the map UI file by searching for a visible string in the UI
> descriptions in indra/newview/skins/xui/en-us. "Copy slurl to
> clipboard" looks like a pretty unique string.
>
> When you find that file, look for two things. First, the name of the
> file. Somewhere in the code there will be a call to buildFloater()
> that takes the filename as an argument. Searching for this should get
> you to the right file. Also, inside the UI description file, look for
> the "Teleport" string. The element that identifies the label attribute
> (the visible part) will also have a name attribute, which is used for
> identifying that button in code. Search for that name in the source
> file that builds up that floater.
>
> >From there, you should see code that sets up a callback for when the
> teleport button is clicked. All you have to do now is set a breakpoint
> on the callback function and follow through in the debugger. That
> should put you right on top of the most current location teleport
> logic.
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> /index.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20070916/4f5a005e/attachment-0001.htm
More information about the SLDev
mailing list