mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 05:45:37 +08:00
Fix minor race condition in llGetCameraRot() where inconsistent information could be returned for a rotating camera
This commit is contained in:
@@ -9939,21 +9939,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (m_item.PermsGranter == UUID.Zero)
|
||||
return new LSL_Rotation();
|
||||
return Quaternion.Identity;
|
||||
|
||||
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0)
|
||||
{
|
||||
ShoutError("No permissions to track the camera");
|
||||
return new LSL_Rotation();
|
||||
return Quaternion.Identity;
|
||||
}
|
||||
|
||||
ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
|
||||
if (presence != null)
|
||||
{
|
||||
return new LSL_Rotation(presence.CameraRotation.X, presence.CameraRotation.Y, presence.CameraRotation.Z, presence.CameraRotation.W);
|
||||
return new LSL_Rotation(presence.CameraRotation);
|
||||
}
|
||||
|
||||
return new LSL_Rotation();
|
||||
return Quaternion.Identity;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user