Fix scripted orbits and rotations (Closes: #576)
parent
fb8544806c
commit
7f0513e3d3
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue