Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions indra/newview/llagent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ std::map<S32, std::string> LLTeleportRequest::sTeleportStatusName = { { kPending
class LLTeleportRequestViaLandmark : public LLTeleportRequest
{
public:
LLTeleportRequestViaLandmark(const LLUUID &pLandmarkId);
LLTeleportRequestViaLandmark(const LLUUID &pLandmarkId, bool log = true);
virtual ~LLTeleportRequestViaLandmark();

virtual void toOstream(std::ostream& os) const;
Expand All @@ -179,6 +179,7 @@ class LLTeleportRequestViaLandmark : public LLTeleportRequest

protected:
inline const LLUUID &getLandmarkId() const {return mLandmarkId;};
bool mLogOnDestruction = true;

private:
LLUUID mLandmarkId;
Expand Down Expand Up @@ -5008,16 +5009,25 @@ void LLTeleportRequest::toOstream(std::ostream& os) const
//-----------------------------------------------------------------------------
// LLTeleportRequestViaLandmark
//-----------------------------------------------------------------------------
LLTeleportRequestViaLandmark::LLTeleportRequestViaLandmark(const LLUUID &pLandmarkId)
: LLTeleportRequest(),
mLandmarkId(pLandmarkId)
LLTeleportRequestViaLandmark::LLTeleportRequestViaLandmark(const LLUUID &pLandmarkId, bool log)
: LLTeleportRequest()
, mLandmarkId(pLandmarkId)
, mLogOnDestruction(true)
{
LL_INFOS("Teleport") << "LLTeleportRequestViaLandmark created, " << *this << LL_ENDL;
if (log)
{
// Workaround to not log twice for LLTeleportRequestViaLure, besides this wouldn't have logged fully.
LL_INFOS("Teleport") << "LLTeleportRequestViaLandmark created, " << *this << LL_ENDL;
}
}

LLTeleportRequestViaLandmark::~LLTeleportRequestViaLandmark()
{
LL_INFOS("Teleport") << "~LLTeleportRequestViaLandmark, " << *this << LL_ENDL;
if (mLogOnDestruction)
{
// Workaround to not crash on toOstream for derived classes and to not log twice.
LL_INFOS("Teleport") << "~LLTeleportRequestViaLandmark, " << *this << LL_ENDL;
}
}

void LLTeleportRequestViaLandmark::toOstream(std::ostream& os) const
Expand Down Expand Up @@ -5047,16 +5057,20 @@ void LLTeleportRequestViaLandmark::restartTeleport()
// LLTeleportRequestViaLure
//-----------------------------------------------------------------------------

LLTeleportRequestViaLure::LLTeleportRequestViaLure(const LLUUID &pLureId, bool pIsLureGodLike)
: LLTeleportRequestViaLandmark(pLureId),
LLTeleportRequestViaLure::LLTeleportRequestViaLure(const LLUUID& pLureId, bool pIsLureGodLike)
: LLTeleportRequestViaLandmark(pLureId, false),
mIsLureGodLike(pIsLureGodLike)
{
LL_INFOS("Teleport") << "LLTeleportRequestViaLure created" << LL_ENDL;
LL_INFOS("Teleport") << "LLTeleportRequestViaLure created: " << *this << LL_ENDL;
}

LLTeleportRequestViaLure::~LLTeleportRequestViaLure()
{
LL_INFOS("Teleport") << "~LLTeleportRequestViaLure" << LL_ENDL;
if (mLogOnDestruction)
{
LL_INFOS("Teleport") << "~LLTeleportRequestViaLure: " << *this << LL_ENDL;
mLogOnDestruction = false;
}
}

void LLTeleportRequestViaLure::toOstream(std::ostream& os) const
Expand Down
5 changes: 4 additions & 1 deletion indra/newview/llviewermessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3139,7 +3139,10 @@ void process_crossed_region(LLMessageSystem* msg, void**)
return;
}
LL_INFOS("Messaging") << "process_crossed_region()" << LL_ENDL;
gAgentAvatarp->resetRegionCrossingTimer();
if (isAgentAvatarValid())
{
gAgentAvatarp->resetRegionCrossingTimer();
}

U32 sim_ip;
msg->getIPAddrFast(_PREHASH_RegionData, _PREHASH_SimIP, sim_ip);
Expand Down
Loading