| 787 | } |
| 788 | |
| 789 | CScriptGameObject* CGameObject::lua_game_object() const |
| 790 | { |
| 791 | if (!m_spawned) |
| 792 | { |
| 793 | Msg("!! [%s] you are trying to use a destroyed object name=[%s] getDestroy=%d", __FUNCTION__, cName().c_str(), getDestroy()); |
| 794 | LogStackTrace("!!stack trace:\n", false); |
| 795 | } |
| 796 | |
| 797 | THROW(m_spawned); |
| 798 | if (!m_lua_game_object) |
| 799 | m_lua_game_object = xr_new<CScriptGameObject>(const_cast<CGameObject*>(this)); |
| 800 | return (m_lua_game_object); |
| 801 | } |
| 802 | |
| 803 | void CGameObject::DestroyObject() |
| 804 | { |
no test coverage detected