Skip to content

Commit 9049947

Browse files
committed
Allow to override 'object' Lua property of CScriptBinderObject class
This allows to run Call of Chernobyl correctly (#1529). Though, I'm not sure if it's right, but original luabind was allowing writing to readonly objects anyway.
1 parent f0fada0 commit 9049947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/xrGame/script_binder_object_script.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SCRIPT_EXPORT(CScriptBinderObject, (),
1919
module(luaState)
2020
[
2121
class_<CScriptBinderObject, no_bases, default_holder, CScriptBinderObjectWrapper>("object_binder")
22-
.def_readonly("object", &CScriptBinderObject::m_object)
22+
.def_readwrite("object", &CScriptBinderObject::m_object)
2323
.def(constructor<CScriptGameObject*>())
2424
.def("reinit", &CScriptBinderObject::reinit, &CScriptBinderObjectWrapper::reinit_static)
2525
.def("reload", &CScriptBinderObject::reload, &CScriptBinderObjectWrapper::reload_static)

0 commit comments

Comments
 (0)