do lsl object rez checks on script thread before wasting time possible creating a new poll thread

0.9.0-post-fixes
UbitUmarov 2017-07-11 02:33:48 +01:00
parent 40b16f1705
commit 72bce8c4b4
1 changed files with 24 additions and 22 deletions

View File

@ -3534,9 +3534,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot)
{
m_host.AddScriptLPS(1);
Util.FireAndForget(x =>
{
if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s))
return;
@ -3559,7 +3556,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
}
List<SceneObjectGroup> new_groups = World.RezObject(m_host, item, pos, rot, vel, param, atRoot);
Util.FireAndForget(x =>
{
Quaternion wrot = rot;
wrot.Normalize();
List<SceneObjectGroup> new_groups = World.RezObject(m_host, item, pos, wrot, vel, param, atRoot);
// If either of these are null, then there was an unknown error.
if (new_groups == null)