Fix xyz again by reverting previous commit and fixing the local variables from not resetting the object states.

This commit is contained in:
Jeff Hutchinson 2021-09-03 23:27:39 -04:00
parent 57de7fd379
commit 313c069ecb
3 changed files with 103 additions and 10 deletions

View file

@ -909,6 +909,24 @@ TEST(Script, MiscRegressions)
)");
ASSERT_EQ(regression1.getInt(), 200);
ConsoleValue regression2 = RunScript(R"(
new SimObject(TheRegressionObject2)
{
extent = "100 200";
};
function doTest()
{
%scale = 2;
%position = TheRegressionObject2.extent.x SPC TheRegressionObject2.extent.y * %scale;
return %position.y;
}
return doTest();
)");
ASSERT_EQ(regression2.getInt(), 400);
}
#endif