Fix scripted orbits and rotations (Closes: #576)

pull/3/head
Hleb Valoshka 2020-01-09 00:39:01 +03:00
parent fb8544806c
commit 7f0513e3d3
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ ScriptedOrbit::initialize(const std::string& moduleName,
luaOrbitObjectName = GenerateScriptObjectName();
// Attach the name to the script orbit
lua_pushvalue(luaState, -2); // dup the orbit object on top of stack
lua_pushvalue(luaState, -1); // dup the orbit object on top of stack
lua_setglobal(luaState, luaOrbitObjectName.c_str());
// Now, call orbit object methods to get the bounding radius

View File

@ -112,7 +112,7 @@ ScriptedRotation::initialize(const std::string& moduleName,
luaRotationObjectName = GenerateScriptObjectName();
// Attach the name to the script rotation
lua_pushvalue(luaState, -2); // dup the rotation object on top of stack
lua_pushvalue(luaState, -1); // dup the rotation object on top of stack
lua_setglobal(luaState, luaRotationObjectName.c_str());
// Get the rest of the rotation parameters; they are all optional.