er, don't define operator= in terms of operator=

This commit is contained in:
Glenn Maynard
2005-02-12 22:00:17 +00:00
parent e31d0ce615
commit 1ae82eeec0
+6 -1
View File
@@ -43,7 +43,12 @@ ActorCommands &ActorCommands::operator=( const ActorCommands& cpy )
if( this == &cpy )
return *this;
*this = cpy;
Unregister();
/* Make a new reference. */
lua_rawgeti( LUA->L, LUA_REGISTRYINDEX, cpy.m_iLuaFunction );
m_iLuaFunction = luaL_ref( LUA->L, LUA_REGISTRYINDEX );
return *this;
}