Commit fddfff2b authored by NiranV's avatar NiranV
Browse files

Fixed: Altitude based windlights not being triggered.

parent fe1b8f63
......@@ -1166,13 +1166,6 @@ void LLAgent::setPositionAgent(const LLVector3 &pos_agent)
mFrameAgent.setOrigin(pos_agent_sitting);
mPositionGlobal = pos_agent_d + mAgentOriginGlobal;
if (((mLastTestGlobal - mPositionGlobal).lengthSquared() > 1.0) && !mOnPositionChanged.empty())
{ // If the position has changed my more than 1 meter since the last time we triggered.
// filters out some noise.
mLastTestGlobal = mPositionGlobal;
mOnPositionChanged(mFrameAgent.getOrigin(), mPositionGlobal);
}
}
else
{
......@@ -1182,6 +1175,13 @@ void LLAgent::setPositionAgent(const LLVector3 &pos_agent)
pos_agent_d.setVec(pos_agent);
mPositionGlobal = pos_agent_d + mAgentOriginGlobal;
}
if (((mLastTestGlobal - mPositionGlobal).lengthSquared() > 1.0) && !mOnPositionChanged.empty())
{ // If the position has changed my more than 1 meter since the last time we triggered.
// filters out some noise.
mLastTestGlobal = mPositionGlobal;
mOnPositionChanged(mFrameAgent.getOrigin(), mPositionGlobal);
}
}
//-----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment