<0,0,0,0> is not a rotation

LSLKeyTest
UbitUmarov 2016-09-03 07:09:05 +01:00
parent d9572bdf4e
commit 16cec3041f
2 changed files with 4 additions and 4 deletions

View File

@ -191,7 +191,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
Constant rca = new Constant(p, "float", "0.0");
Constant rcb = new Constant(p, "float", "0.0");
Constant rcc = new Constant(p, "float", "0.0");
Constant rcd = new Constant(p, "float", "0.0");
Constant rcd = new Constant(p, "float", "1.0");
ConstantExpression rcea = new ConstantExpression(p, rca);
ConstantExpression rceb = new ConstantExpression(p, rcb);
ConstantExpression rcec = new ConstantExpression(p, rcc);

View File

@ -339,7 +339,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
y = (float)Quat.y;
z = (float)Quat.z;
s = (float)Quat.s;
if (x == 0 && y == 0 && z == 0 && s == 0)
if (s == 0 && x == 0 && y == 0 && z == 0)
s = 1;
}
@ -349,7 +349,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
y = Y;
z = Z;
s = S;
if (x == 0 && y == 0 && z == 0 && s == 0)
if (s == 0 && x == 0 && y == 0 && z == 0)
s = 1;
}
@ -368,7 +368,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y);
res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z);
res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.NumberFormatInfo, out s);
if (x == 0 && y == 0 && z == 0 && s == 0)
if (s == 0 && x == 0 && y == 0 && z == 0)
s = 1;
}