reduce calls to physics world cast rays for camera collision check

This commit is contained in:
UbitUmarov
2016-11-14 03:21:07 +00:00
parent 3cb2b3b2d1
commit ae17b5d203
3 changed files with 55 additions and 51 deletions

View File

@@ -6263,7 +6263,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
bool movement = CheckAgentMovementUpdateSignificance(x);
bool camera = CheckAgentCameraUpdateSignificance(x);
// Was there a significant movement/state change?
if (movement)
{
@@ -6274,6 +6274,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_thisAgentUpdateArgs.HeadRotation = x.HeadRotation;
m_thisAgentUpdateArgs.State = x.State;
m_thisAgentUpdateArgs.NeedsCameraCollision = !camera;
UpdateAgent handlerAgentUpdate = OnAgentUpdate;
UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate;
@@ -6282,7 +6284,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (handlerAgentUpdate != null)
OnAgentUpdate(this, m_thisAgentUpdateArgs);
}
// Was there a significant camera(s) change?
@@ -6293,6 +6295,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_thisAgentUpdateArgs.CameraLeftAxis = x.CameraLeftAxis;
m_thisAgentUpdateArgs.CameraUpAxis = x.CameraUpAxis;
m_thisAgentUpdateArgs.NeedsCameraCollision = true;
UpdateAgent handlerAgentCameraUpdate = OnAgentCameraUpdate;
if (handlerAgentCameraUpdate != null)